All_define.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. #ifndef __ALL_DEFINE_H
  2. #define __ALL_DEFINE_H
  3. #include "sys.h"
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6. #include <string.h>
  7. #include "gd32f30x.h"
  8. #include "FreeRTOS.h"
  9. #include "task.h"
  10. #include "queue.h"
  11. #include "semphr.h"
  12. #include "lcd_task.h"
  13. #include "crc16.h"
  14. #include "relay.h"
  15. #define KEY4_5_blink (1<<16)
  16. #define Change_baud (1<<12)
  17. #define Need_Write (1<<8)
  18. #define Wake_up (1<<4)
  19. #define CODE_VERSION 0x0001
  20. extern QueueHandle_t MB_RTU_Rx_Queue;
  21. extern QueueHandle_t MB_RTU_Tx_Queue;
  22. extern SemaphoreHandle_t modebus_tx_semap;
  23. extern uint16_t fuji_or_shuiji;//0-氟机 1-水机
  24. extern struct_realy_t struct_realy;
  25. typedef struct
  26. {
  27. uint32_t switch_onoff;//0-关 ;1-开
  28. uint32_t mode;//0-cold;1-hot;2-dry;3-wind
  29. uint16_t level;//0- auto,1- low,2- middle,3- high
  30. uint32_t temp_set;
  31. }Air_Condition;
  32. typedef struct
  33. {
  34. uint32_t switch_onoff;//0-关 ;1-开
  35. uint32_t temp_set;
  36. }Floor_Condition;
  37. typedef struct
  38. {
  39. uint32_t switch_onoff;//0-关 ;1-开
  40. uint32_t level;//0- auto,1- low,2- middle,3- high
  41. }Fresh_Air_Condition;
  42. typedef struct
  43. {
  44. Air_Condition air_condition;
  45. Floor_Condition floor_condition;
  46. Fresh_Air_Condition fresh_air_condition;
  47. }Work_State_Info;
  48. typedef struct
  49. {
  50. uint32_t Is_zigbee_cmd;//0-本机,1-zigbee
  51. uint32_t work_state_cur;
  52. Work_State_Info work_state_info;
  53. uint32_t Is_Wakeup;
  54. uint32_t Is_Out_sleep;
  55. uint32_t Is_From_485;
  56. uint32_t Is_clear_lcd;
  57. }Zigbee_cmd;
  58. extern TaskHandle_t LEDTask_Handler;
  59. extern Dis_page_num dis_page_num;
  60. extern Dis_page_param dis_page_param;
  61. extern Zigbee_cmd zigbee_cmd;
  62. void Set_LCD_lum(u16 lum);
  63. extern u16 SaveData[32];
  64. #endif