GPS Device
Loading...
Searching...
No Matches
MENU_CFG_ts Struct Reference

Configuration structure for initializing a menu handle. More...

#include <menu.h>

Public Attributes

char title [SSD1309_MAX_CHARS_IN_LINE]
char options [CONFIG_MENU_MAX_OPTIONS][SSD1309_MAX_CHARS_IN_LINE]
MENU_TYPE_ts type
ERR_te(* get_value_fn )(uint8_t index, char **value_o)
char name [CONFIG_MENU_MAX_NAME_LEN]

Detailed Description

Configuration structure for initializing a menu handle.

Passed to menu_init_handle. The number of options is determined automatically by scanning for the first entry whose first character is ‘’\0'`, so the options array must be null-terminated in this sense.

Definition at line 78 of file menu.h.

Member Data Documentation

◆ title

char MENU_CFG_ts::title[SSD1309_MAX_CHARS_IN_LINE]

Title string displayed at the bottom of the screen (null-terminated).

Definition at line 80 of file menu.h.

◆ options

char MENU_CFG_ts::options[CONFIG_MENU_MAX_OPTIONS][SSD1309_MAX_CHARS_IN_LINE]

Array of option label strings. Each entry is a null-terminated string of at most SSD1309_MAX_CHARS_IN_LINE characters. The array is scanned until an entry whose first byte is ‘’\0'` is found, which marks the end of the option list.

Definition at line 88 of file menu.h.

◆ type

MENU_TYPE_ts MENU_CFG_ts::type

Menu rendering and interaction mode.

Definition at line 91 of file menu.h.

◆ get_value_fn

ERR_te(* MENU_CFG_ts::get_value_fn) (uint8_t index, char **value_o)

Callback used by MENU_TYPE_DATA_VIEW menus to fetch the live value for a given option index at render time.

Parameters
[in]indexZero-based index of the option whose value is needed.
[out]value_oPointer that will be set to the value string.
Returns
ERR_OK on success, any other code signals a data acquisition failure.

Definition at line 101 of file menu.h.

◆ name

char MENU_CFG_ts::name[CONFIG_MENU_MAX_NAME_LEN]

Human-readable name of this menu instance (null-terminated).

Definition at line 104 of file menu.h.


The documentation for this struct was generated from the following file: