screen.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef __SCREEN_H
  2. #define __SCREEN_H
  3. #include "stdint.h"
  4. #define Icon_Stop 0x02
  5. #define Icon_Run 0x01
  6. #define Icon_Warn 0x14
  7. #define Icon_Clear 0x00
  8. #define Icon_Up 0x0F
  9. #define Icon_Down 0x10
  10. #define Icon_Hign_Speed 0x03
  11. #define Icon_Mid_Speed 0x04
  12. #define Icon_Low_Speed 0x05
  13. #define Icon_Battery_00 0x00
  14. #define Icon_Battery_20 0x0C
  15. #define Icon_Battery_40 0x0B
  16. #define Icon_Battery_60 0x0A
  17. #define Icon_Battery_80 0x09
  18. #define Icon_Battery_100 0x08
  19. #define SPEED_OFF 0x00
  20. #define HIGH_SPEED 0x03
  21. #define MID_SPEED 0x04
  22. #define LOW_SPEED 0x05
  23. #define LIFT_ICON 0x0
  24. #define UP_ICON 0x0F
  25. #define DOWN_ICON 0x10
  26. #define SCREEN_RECV_DATA_LEN 7
  27. #define SCREEN_STATUS_INIT 0
  28. #define SCREEN_BTN_IDX_TYPE 4
  29. #define SCREEN_BTN_TYPE_ST 0
  30. #define SCREEN_BTN_TYPE_STATUS 1
  31. #define SCREEN_BTN_TYPE_SPEED 2
  32. #define SCREEN_BTN_ID_STOP 1
  33. #define SCREEN_BTN_ID_START 2
  34. #define SCREEN_STATUS_SECOND 1
  35. #define SCREEN_STATUS_DATA 2
  36. #define SCREEN_BTN_IDX_ID 6
  37. #define SCREEN_BTN_ID_KEY_VALUE 0
  38. #define SCREEN_BTN_ID_STATUS_START 1
  39. #define SCREEN_BTN_ID_STATUS_STOP 2
  40. #define SCREEN_BTN_ID_SPEED_HIGH 3
  41. #define SCREEN_BTN_ID_SPEED_MID 4
  42. #define SCREEN_BTN_ID_SPEED_LOW 5
  43. #define SCREEN_BTN_ID_LIFT_UP 6
  44. #define SCREEN_BTN_ID_LIFT_DOWN 7
  45. void Screen_SetBatteryStatus(uint8_t batteryLevel);
  46. void Screen_SetCode(uint8_t Error_Status);
  47. void Screen_SetTarget(uint16_t Target_Site);
  48. void Screen_Icon_Speed(uint8_t Speed_Status);
  49. void Screen_Icon_Run(uint8_t Icon_Status);
  50. void Screen_Icon_Lift(uint8_t Icon_Status);
  51. void Screen_Icon_Warn(uint8_t Icon_Status);
  52. void Screen_Icon_Battery(uint8_t Icon_Status);
  53. #endif