task_communication(4179).h 953 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef _TASK_COMMUNICATION_H_
  2. #define _TASK_COMMUNICATION_H_
  3. //-------------私有包含
  4. #include "FreeRTOS.h"
  5. #include "task.h"
  6. #include "main.h"
  7. #include "cmsis_os.h"
  8. #include "gpio.h"
  9. #include "stdio.h"
  10. #include "electronicFence.h"
  11. #include "EC800_FTP_OTA.h"
  12. #include "comm_car_485.h"
  13. #include "EC800.h"
  14. #include "task_ec800_upload.h"
  15. /* typedef -----------------------------------------------------------*/
  16. typedef struct{
  17. uint8_t fenceStatus; // 围栏状态 1:超出围栏 0:围栏内
  18. uint8_t maxFeed; // 下发给车的最高时速 km/h
  19. uint8_t maxRunFeed; // 此时车的允许运行时速 km/h
  20. uint8_t driveStatus; // 行车状态 2:为中间态(打火但没行驶,车速为0) 1:初始态 3:运行态(行驶速度大于判断阈值)
  21. uint8_t Malfunction; // 故障 定义
  22. // 0x01:超出围栏故障 0x02:485通信故障 0x03:升级故障 0x04:MQTT故障
  23. // 0x05:陀螺仪故障
  24. }comData;
  25. extern comData s_comData;
  26. //-------------函数声明
  27. extern void task_communication_content(void);
  28. #endif