This module provides a simple menu system for monochrome graphical displays.
Typical flow of an application using the menu system:
The menu is declared using the Menu system for monochrome graphical displays struct. To start the menu system, call the gfx_mono_menu_init function. This function will clear the display and draw the menu. Before the menu can be updated, you need input from the user. Methods for getting input is not part of the menu module. As soon as input is received, inform the menu system using the gfx_mono_menu_process_key function. This function will then return a status code and act depending on the given key-code:
The value of the key-codes used are defined in conf_menu.h. These values can be changed if needed. The graphical indicator used to indicate menu selection is defined in conf_menu.h. This indicator can be changed if needed.
The menu system functions are listed below, implemented in gfx_mono_menu.h/c.
| Functions | Description |
|---|---|
| gfx_mono_menu_init() | Initialize the menu handling. Clear screen and draw menu. |
| gfx_mono_menu_process_key() | Update menu depending on input |