![]() |
WIZlib Library API
ver 1.0
WIZlib Library API User Menual
|
Usermenu Module. More...
|
Macros | |
| #define | MAX_MENU_COUNT 10 |
| Maximum number of User Menu Definition. More... | |
| #define | CMD_BUF_SIZE 100 |
| Maximum Terminal Input Buffer Size. More... | |
Typedefs | |
| typedef int8(* | menu_func )(menu_ctrl mctrl, int8 *mbuf) |
| User Menu Callback Function Definition. More... | |
Enumerations | |
| enum | menu_ctrl { MC_START, MC_END, MC_DATA } |
| Menu Control Signal. More... | |
Functions | |
| void | menu_init (void) |
| Initialize Usermenu Module. | |
| int8 | menu_add (int8 *desc, int8 parent, menu_func mfunc) |
| Add Usermenu. More... | |
| void | menu_print_tree (void) |
| Print Current Registered Menu. More... | |
| void | menu_run (void) |
| Usermenu Handler. More... | |
Usermenu Module.
You can easily add a menu that can be selected using
the Usermenu module can be used in the terminal.
| #define CMD_BUF_SIZE 100 |
Maximum Terminal Input Buffer Size.
Definition at line 37 of file usermenu.h.
| #define MAX_MENU_COUNT 10 |
Maximum number of User Menu Definition.
Definition at line 26 of file usermenu.h.
| typedef int8(* menu_func)(menu_ctrl mctrl, int8 *mbuf) |
User Menu Callback Function Definition.
The function form with which a user menu function will be added to the menu
| mctrl | With this signal, Callback function can determine user action (menu_ctrl) |
| mbuf | The string buffer which user input |
Definition at line 61 of file usermenu.h.
| enum menu_ctrl |
Menu Control Signal.
With this signal, Callback function can determine user action
| Enumerator | |
|---|---|
| MC_START |
When user entered into a menu. |
| MC_END |
When user exited out of a menu. |
| MC_DATA |
While user is in a menu. |
Definition at line 46 of file usermenu.h.
| int8 menu_add | ( | int8 * | desc, |
| int8 | parent, | ||
| menu_func | mfunc | ||
| ) |
Add Usermenu.
| desc | Brief which will be displayed |
| parent | Parent menu index. - Root index is 0 - A return value of this function can be used |
| mfunc | The Callback function which will be called when user input enter key |
Definition at line 54 of file usermenu.c.
| void menu_print_tree | ( | void | ) |
| void menu_run | ( | void | ) |
Usermenu Handler.
This function should be run under main loop.
Definition at line 112 of file usermenu.c.
1.8.3.1