user_config.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. #ifndef _USER_CONFIG_H_
  2. #define _USER_CONFIG_H_
  3. #include "yc_protocol.h"
  4. #include "GT5DL32A3W.h"
  5. #include "EPD.h"
  6. #include "GUI_Paint.h"
  7. #include "LORA.h"
  8. #include "LED.h"
  9. #include "user_button.h"
  10. #include "FONT_LIB.h"
  11. #include "SPIFFS.h"
  12. #include "Decection.h"
  13. typedef enum
  14. {
  15. YC_TASK_NONE = 0,
  16. YC_TASK_OTHER,
  17. YC_TASK_BUTTON,
  18. YC_TASK_LORA,
  19. YC_TASK_UNPACK,
  20. YC_TASK_LOGIC,
  21. YC_TASK_RIGHT_SCREEN,
  22. YC_TASK_LEFT_SCREEN,
  23. YC_TASK_DEAL, // 数据处理
  24. YC_TASK_END,
  25. } YC_TASK_FUNC;
  26. #define LEFT_SCREEN_BIT 1
  27. #define RIGHT_SCREEN_BIT 2
  28. #define SCREEN_WIDTH 648
  29. #define SCREEN_HEIGHT 480
  30. extern FONT_TYPE_T ascii_type_5x7;
  31. extern FONT_TYPE_T ascii_type_7x8;
  32. extern FONT_TYPE_T ascii_type_6x12;
  33. extern FONT_TYPE_T ascii_type_8x16;
  34. extern FONT_TYPE_T ascii_type_12x24;
  35. extern FONT_TYPE_T ascii_type_12x24_b;
  36. extern FONT_TYPE_T ascii_type_16x32;
  37. extern FONT_TYPE_T chinese_type_12;
  38. extern FONT_TYPE_T chinese_type_16;
  39. extern FONT_TYPE_T chinese_type_24;
  40. extern FONT_TYPE_T chinese_type_32;
  41. extern PAINT_TIME Paint_time_info;
  42. extern PAINT Paint_info;
  43. #if !HARDWARE_SPI
  44. extern struct EPD_INFO_SET left_screen;
  45. extern struct EPD_INFO_SET right_screen;
  46. #endif
  47. extern adc_oneshot_unit_handle_t adc1_handle;
  48. // extern Machine_info_t Machine_info;
  49. typedef enum
  50. {
  51. STATE_NONE = 0, // 机器状态
  52. STATE_OPERATION = 1, // 运行
  53. STATE_SHUT_DOWN = 2, // 停机
  54. STATE_BREAKDOWN = 3, // 故障
  55. STATE_SAFEKEEP = 4, // 封存
  56. STATE_UPKEEP = 5, // 保养
  57. STATE_WAIT_MATERIALS = 6, // 待料
  58. STATE_END,
  59. } Machine_state_t;
  60. // typedef struct
  61. // {
  62. // bool is_into_sleep;
  63. // bool is_left;
  64. // }Screen_dis_t;
  65. extern int last_batt_precent;
  66. void esp_ble_ota(void);
  67. void reset_default(bool is_dis, uint8_t power_status);
  68. void Paint_leftScreen(bool is_poweron, bool is_test);
  69. void Paint_rightScreen(bool is_poweron, bool is_test);
  70. void goto_deep_sleep(void);
  71. #endif