Refactoring menu code to be non-blocking
Added macros for GPIO read/write
This commit is contained in:
@@ -60,20 +60,28 @@
|
||||
|
||||
#define MENU_SEL_RECT_RADIUS 5
|
||||
|
||||
typedef struct {
|
||||
bool exitToMainScreen;
|
||||
}MENU_t;
|
||||
typedef enum
|
||||
{
|
||||
MENU_ID_NONE = 0,
|
||||
MENU_ID_AUTOSHUTDOWN,
|
||||
MENU_ID_FREQUENCIES,
|
||||
MENU_ID_SYSINFO,
|
||||
MENU_ID_LANGUAGE,
|
||||
|
||||
} MenuItemId_t;
|
||||
|
||||
//Menu Item Struct
|
||||
//contains pointers to both mono and color bitmaps. mono bitmap requires a color.
|
||||
//each item may have a mono bitmap, a color bitmap, or no bitmap.
|
||||
typedef struct {
|
||||
|
||||
uint16_t * pMonoIcon; // bitmap
|
||||
typedef struct MENU_ITEM_s
|
||||
{
|
||||
uint32_t * pMonoIcon; // bitmap
|
||||
char text[MENU_MAX_STRING_LENGTH];
|
||||
}MENU_ITEM_t;
|
||||
MenuItemId_t id;
|
||||
|
||||
} MENU_ITEM_t;
|
||||
|
||||
|
||||
void Menu_init(void);
|
||||
void Menu_mainMenu(void);
|
||||
void Menu_service(void);
|
||||
|
||||
void MENU_Init(void);
|
||||
void MENU_Main(void);
|
||||
|
||||
Reference in New Issue
Block a user