1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- #ifndef _TASK_COMMUNICATION_H_
- #define _TASK_COMMUNICATION_H_
- //-------------私有包含
- #include "FreeRTOS.h"
- #include "task.h"
- #include "main.h"
- #include "cmsis_os.h"
- #include "gpio.h"
- #include "stdio.h"
- #include "electronicFence.h"
- #include "EC800_FTP_OTA.h"
- #include "comm_car_485.h"
- #include "EC800.h"
- #include "task_ec800_upload.h"
- /* typedef -----------------------------------------------------------*/
- typedef struct{
- uint8_t fenceStatus; // 围栏状态 1:超出围栏 0:围栏内
- uint8_t maxFeed; // 下发给车的最高时速 km/h
- uint8_t maxRunFeed; // 此时车的允许运行时速 km/h
- uint8_t driveStatus; // 行车状态 2:为中间态(打火但没行驶,车速为0) 1:初始态 3:运行态(行驶速度大于判断阈值)
- uint8_t Malfunction; // 故障 定义
- // bit0:超出围栏故障 bit1:485通信故障 bit2:升级故障 bit3:MQTT故障
- // bit4:陀螺仪故障 bit5:电池故障 bit6:4G模块初始化失败
- uint8_t vinRecSuccess; // 车架号成功获取标志 1;成功获取 0:暂未获取
- }comData;
- extern comData s_comData;
- // 故障枚举
- enum malfunction{
- fence,
- com485,
- update,
- errorMqtt,
- gyroscope,
- batError,
- init_4G_error,
- };
- /* define -----------------------------------------------------------*/
- #define times_3s 3
- //-------------函数声明
- extern void task_communication_content(void);
- #endif
|