GPS Device
Loading...
Searching...
No Matches
menu.h File Reference

Menu module public API. More...

#include <stdint.h>
#include "common.h"
#include "ssd1309.h"
#include "err.h"
#include "configuration.h"
Include dependency graph for menu.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

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

Typedefs

typedef struct menu_handle_s MENU_HANDLE_ts
 Opaque handle representing a menu instance.

Enumerations

enum  MENU_TYPE_ts { MENU_TYPE_SELECTABLE , MENU_TYPE_DATA_VIEW }
 Determines the rendering and interaction mode of a menu. 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.

Detailed Description

Menu module public API.

Author
github.com/Baksi675

This module provides an OLED display menu system backed by the SSD1309 driver. Two menu types are supported:

Both types support a navigation history stack via menu_set_prev_menu and menu_get_prev_menu, allowing a back-navigation pattern.

Typical usage:

Version
0.1
Date
2026-02-01

Definition in file menu.h.