working_modes.h 609 B

1234567891011121314151617181920212223242526272829303132
  1. #pragma once
  2. #define MODE_NO_CHANGE 0xff
  3. #define MODE_DEFAULT 0
  4. #define MODE_MAIN_MENU 1
  5. #define MODE_SETTINGS_MENU 2
  6. #define SETTINGS_TYPE_BACK 0
  7. #define SETTINGS_TYPE_BOOL 1
  8. struct main_menu_pos_s {
  9. unsigned char (* func)(void);
  10. };
  11. struct settings_menu_pos_s {
  12. unsigned char type;
  13. __flash const char *name;
  14. unsigned char index;
  15. };
  16. struct menu_params_s {
  17. unsigned char main_menu_pos;
  18. unsigned char settings_menu_pos;
  19. };
  20. extern struct menu_params_s mp;
  21. void key_process(void);
  22. unsigned char main_menu_right_press(void);
  23. unsigned char enter_settings(void);
  24. void display_settings_menu_item(void);