display.h 729 B

1234567891011121314151617181920212223242526272829
  1. #pragma once
  2. #define DISPLAY_STATE_NO_CHANGE 0
  3. #define DISPLAY_STATE_STARTUP 1
  4. #define DISPLAY_STATE_POWEROFF 2
  5. #define DISPLAY_STATE_POWEROFF_LOWBAT 3
  6. #define DISPLAY_STATE_START_MESSAGE 4
  7. #define DISPLAY_STATE_CARD_OK 5
  8. #define DISPLAY_STATE_FILE_OPEN 6
  9. #define DISPLAY_STATE_FILE_CLOSED 7
  10. #define DISPLAY_STATE_MAIN_DEFAULT 8
  11. #define DISPLAY_STATE_COORD 9
  12. #define DISPLAY_STATE_ELE_SAT 10
  13. #define DISPLAY_STATE_DIST_TIME 11
  14. #define DISPLAY_STATE_SPEED 12
  15. #define DISPLAY_STATE_MAIN_MENU 13
  16. #define DISPLAY_STATE_SETTINGS_MENU 14
  17. struct disp_s {
  18. char line1[16];
  19. char line2[17];
  20. };
  21. extern struct disp_s disp;
  22. void disp_init(void);
  23. void display_refresh(unsigned char newstate);
  24. void display_state(unsigned char newstate);