Implementation of menu system for LCD display interface.
More...
#include <stdint.h>
Go to the source code of this file.
|
| enum | element_type_t {
ELEMENT_VAL = 0
, ELEMENT_FLT = 1
, ELEMENT_BAR = 2
, ELEMENT_BUTTON = 3
,
ELEMENT_OPTION = 4
, ELEMENT_LIST = 5
} |
| |
| enum | element_state_t { STATE_NORMAL = 0
, STATE_HOVER = 1
, STATE_SELECTED = 2
} |
| |
Implementation of menu system for LCD display interface.
Provides functions for managing menu navigation, element styling, and user interaction with the LCD display menu system.
- Author
- Irving Wang (irvin.nosp@m.gw@p.nosp@m.urdue.nosp@m..edu)
◆ MS_decrementValue()
Decrements the value of a menu element and updates its display.
If decrementing would exceed min_value, wraps around to max_value. Updates display based on element type (float or integer value).
- Parameters
-
| element | Pointer to the menu element to decrement |
◆ MS_incrementValue()
Increments the value of a menu element and updates its display.
If incrementing would exceed max_value, wraps around to min_value. Updates display based on element type (float or integer value).
- Parameters
-
| element | Pointer to the menu element to increment |
◆ MS_listGetSelected()
Gets the index of the selected element in a menu page.
- Parameters
-
| page | Pointer to the menu page structure |
- Returns
- Index of the selected element, -1 if no element is selected
◆ MS_moveDown()
Moves menu selection down or increments selected element value.
- Parameters
-
| page | Pointer to the menu page structure |
◆ MS_moveUp()
Moves menu selection up or increments selected element value.
- Parameters
-
| page | Pointer to the menu page structure |
◆ MS_refreshPage()
Refreshes the menu page by resetting selection state and updating all elements.
- Parameters
-
| page | Pointer to the menu page to refresh |
◆ MS_select()
Handles menu element selection and actions.
- Parameters
-
| page | Pointer to the menu page |