|
GPS Device
|
Public functions to interact with the menu subsystem. More...

Functions | |
| ERR_te | menu_init_subsys (void) |
| Initializes the menu subsystem. | |
| ERR_te | menu_deinit_subsys (void) |
| Deinitializes the menu subsystem. | |
| ERR_te | menu_start_subsys (void) |
| Starts the menu subsystem. | |
| ERR_te | menu_stop_subsys (void) |
| Stops the menu subsystem. | |
| ERR_te | menu_init_handle (MENU_CFG_ts *menu_cfg, MENU_HANDLE_ts **menu_handle_o) |
| Initializes and registers a menu handle. | |
| ERR_te | menu_run_handle (MENU_HANDLE_ts *menu_handle) |
| Renders a single menu to the display. | |
| ERR_te | menu_run_handle_all (void) |
| Renders all registered menus to the display. | |
| ERR_te | menu_get_selected_option (MENU_HANDLE_ts const *menu_handle, char *selected_option_o) |
| Retrieves the string of the currently highlighted option. | |
| ERR_te | menu_scroll (MENU_HANDLE_ts *menu_handle, VERTICAL_DIR_te vertical_dir) |
| Moves the menu selection cursor by one step in the given direction. | |
| ERR_te | menu_get_prev_menu (MENU_HANDLE_ts *menu_handle, MENU_HANDLE_ts **prev_menu_handle_o) |
| Pops and returns the previous menu from the navigation history stack. | |
| ERR_te | menu_set_prev_menu (MENU_HANDLE_ts *menu_handle, MENU_HANDLE_ts *prev_menu_handle) |
| Pushes a menu onto the navigation history stack of another menu. | |
Public functions to interact with the menu subsystem.
| ERR_te menu_init_subsys | ( | void | ) |
Initializes the menu subsystem.
Resets the internal state, initializes the logging dependency, and registers the CLI commands.
Must be called before any other menu API function.
Definition at line 159 of file menu.c.


| ERR_te menu_deinit_subsys | ( | void | ) |
Deinitializes the menu subsystem.
Resets the internal state to zero and deregisters the CLI commands. The subsystem must be stopped before calling this function.
Definition at line 195 of file menu.c.

| ERR_te menu_start_subsys | ( | void | ) |
Starts the menu subsystem.
Definition at line 220 of file menu.c.

| ERR_te menu_stop_subsys | ( | void | ) |
Stops the menu subsystem.
Definition at line 244 of file menu.c.
| ERR_te menu_init_handle | ( | MENU_CFG_ts * | menu_cfg, |
| MENU_HANDLE_ts ** | menu_handle_o ) |
Initializes and registers a menu handle.
Counts the number of options in menu_cfg by scanning for the first entry whose first character is ‘’\0'`, copies all configuration into the internal pool, and sets up initial scroll state.
For MENU_TYPE_DATA_VIEW menus, the internal option count is doubled to account for interleaved label and value rows.
| [in] | menu_cfg | Pointer to the menu configuration structure. |
| [out] | menu_handle_o | Pointer to a handle pointer that will be set to the allocated menu instance. |
menu_cfg Definition at line 268 of file menu.c.


| ERR_te menu_run_handle | ( | MENU_HANDLE_ts * | menu_handle | ) |
Renders a single menu to the display.
Clears the display area, dispatches to the appropriate internal renderer based on MENU_TYPE_ts, and triggers a display update.
| [in,out] | menu_handle | Pointer to the menu handle to render. |
Definition at line 340 of file menu.c.


| ERR_te menu_run_handle_all | ( | void | ) |
Renders all registered menus to the display.
Iterates over all active handles and calls menu_run_handle on each.
Definition at line 356 of file menu.c.

| ERR_te menu_get_selected_option | ( | MENU_HANDLE_ts const * | menu_handle, |
| char * | selected_option_o ) |
Retrieves the string of the currently highlighted option.
Only valid for MENU_TYPE_SELECTABLE menus. Returns ERR_INVALID_ARGUMENT for MENU_TYPE_DATA_VIEW menus.
| [in] | menu_handle | Pointer to the menu handle to query. |
| [out] | selected_option_o | Pointer to a buffer that will receive the selected option string (null-terminated). Must be at least SSD1309_MAX_CHARS_IN_LINE bytes. |
Definition at line 367 of file menu.c.


| ERR_te menu_scroll | ( | MENU_HANDLE_ts * | menu_handle, |
| VERTICAL_DIR_te | vertical_dir ) |
Moves the menu selection cursor by one step in the given direction.
Increments or decrements the internal selection index. The actual clamping to valid bounds and display update happen on the next call to menu_run_handle.
| [in,out] | menu_handle | Pointer to the menu handle to scroll. |
| [in] | vertical_dir | UP to move the selection up, DOWN to move it down. |
Definition at line 387 of file menu.c.

| ERR_te menu_get_prev_menu | ( | MENU_HANDLE_ts * | menu_handle, |
| MENU_HANDLE_ts ** | prev_menu_handle_o ) |
Pops and returns the previous menu from the navigation history stack.
Used to implement back-navigation. The popped handle is removed from the stack.
| [in,out] | menu_handle | Pointer to the current menu handle. |
| [out] | prev_menu_handle_o | Pointer to a handle pointer that will be set to the previous menu. |
Definition at line 402 of file menu.c.

| ERR_te menu_set_prev_menu | ( | MENU_HANDLE_ts * | menu_handle, |
| MENU_HANDLE_ts * | prev_menu_handle ) |
Pushes a menu onto the navigation history stack of another menu.
Used to record the menu to return to when the user navigates back. Call this before transitioning to a new menu.
| [in,out] | menu_handle | Pointer to the current menu handle whose history stack will be updated. |
| [in] | prev_menu_handle | Pointer to the menu handle to push onto the history stack. |
Definition at line 412 of file menu.c.
