32 lines
716 B
C
32 lines
716 B
C
#ifndef UI_H
|
|
#define UI_H
|
|
#include <stdint.h>
|
|
|
|
void ui_init(void);
|
|
|
|
struct display_menu {
|
|
struct display_menu *next;
|
|
int entry_n;
|
|
struct display_menu_entry {
|
|
char title[16];
|
|
void (*action)(const void *arg);
|
|
const void *arg;
|
|
} entry[8];
|
|
|
|
};
|
|
|
|
const struct display_menu MainMenu, MeasureMenu, SignalGenMenu,
|
|
ExtraMenu;
|
|
|
|
void ui_display_menu(const struct display_menu *menu);
|
|
void ui_button_press(uint8_t b, int hold);
|
|
|
|
struct display_menu *CurrentMenu;
|
|
|
|
/* Defined in main to intercept input controls */
|
|
void set_input_callback(void (*cb)(uint8_t press, int hold));
|
|
void clear_input_callback(void);
|
|
void set_keepalive(void (*cb)(void));
|
|
void clear_keepalive(void);
|
|
|
|
#endif
|