12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- #ifndef _GLOBAL_H_
- #define _GLOBAL_H_
- /* includes ----------------------------------------------------------*/
- #include "stm32f1xx_hal.h"
- #include "usart.h"
- #include <string.h>
- #include "EC800.h"
- #include "flash.h"
- #include "task_communication.h"
- #include "comm_car_485.h"
- /* typedef -----------------------------------------------------------*/
- typedef struct{
- uint16_t ctrEvent; // 中控板事件
- // bit0:中控板迁移事件
- // 故障相关
- uint8_t positionErrorCnt; // 定位信息错误计数
- uint8_t mqttTimeoutCnt; // MQTT通信超时计数
- uint8_t InitFaultFlag_4G; // 4g模块初始化标志 1:初始化失败 0:初始化成功
- uint8_t timeoutCnt_485; // 485通信超时计数
-
- }global_par;
- extern global_par s_global_par;
- // 事件枚举
- enum event{
- CtrlPanelMigration, // 中控板迁移事件
- };
- /* define ------------------------------------------------------------*/
- #define TIMEOUT_485 10 // 10S 485通信超时时间
- /* macro -------------------------------------------------------------*/
- /* variables ---------------------------------------------------------*/
- /* function prototypes -----------------------------------------------*/
- // @brief 中控板初始化
- extern void centralCtrSys_Init(param_boot *p_param_boot, global_par *p_global_par);
- #endif
|