DMCP interface  03.15_020
System Dialogs

System dialogs. More...

Typedefs

typedef int(* file_sel_fn_t) (const char *fpath, const char *fname, void *data)
 "File selected" callback for file_selection_screen() More...
 

Functions

void run_set_time ()
 Activates "Set Time" screen.
 
void run_set_date ()
 Activates "Set Date" screen.
 
void disp_disk_info (const char *hdr)
 Activates "Disk Info" screen.
 
int power_check_screen ()
 Check power voltage and requests USB connection if power is low. More...
 
int file_selection_screen (const char *title, const char *base_dir, const char *ext, file_sel_fn_t sel_fn, int disp_new, int overwrite_check, void *data)
 Displays file selection dialog. More...
 

Detailed Description

System dialogs.

Typedef Documentation

◆ file_sel_fn_t

typedef int(* file_sel_fn_t) (const char *fpath, const char *fname, void *data)

"File selected" callback for file_selection_screen()

Parameters
fpathComplete file pathname (usable for f_open() )
fnameFile name (usable for print)
dataData passed from file_selection_screen()
Returns
(0/1) 0 - continue selection dialog, nonzero - exit and use as exit value

Function Documentation

◆ file_selection_screen()

int file_selection_screen ( const char *  title,
const char *  base_dir,
const char *  ext,
file_sel_fn_t  sel_fn,
int  disp_new,
int  overwrite_check,
void *  data 
)

Displays file selection dialog.

Parameters
titleScreen title
base_dirBase directory where the file list starts
extExtension (including dot if required)
sel_fnCallback function for selected file
disp_new(0/1) 1 = Display "<New File>" line
overwrite_check(0/1) 1 = Check whether file exists and asks for overwrite permission before sel_fn is called
dataUser supplied data pointer passed directly to sel_fn
Returns
MRET_EXIT if canceled, otherwise contains value passed from sel_fn

◆ power_check_screen()

int power_check_screen ( )

Check power voltage and requests USB connection if power is low.

Returns
(0/1) 0 = Sufficient battery or USB connected, 1 = Dialog canceled or timeout, no USB connected

This dialog can be used before power sensitive or power intensive operations. Requesting user to connect USB power if battery voltage is at lower side.