Implementation of menu system for LCD display interface.
More...
#include <stdint.h>
Go to the source code of this file.
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)
◆ element_state_t
| Enumerator |
|---|
| STATE_NORMAL | |
| STATE_HOVER | |
| STATE_SELECTED | |
◆ element_type_t
| Enumerator |
|---|
| ELEMENT_VAL | |
| ELEMENT_FLT | |
| ELEMENT_BAR | |
| ELEMENT_BUTTON | |
| ELEMENT_OPTION | |
| ELEMENT_LIST | |
◆ 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 |