123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120 |
- /***
- * @Author: chenjie
- * @Date: 2022-06-06
- * @LastEditTime: 2022-10-27
- * @LastEditors: chenjie
- * @Description:
- * @FilePath: \S32K146_4G\code\app\AppGlobalVar.h
- * @Copyright (c) 2022 by chenjie, All Rights Reserved.
- */
- #ifndef APPGLOBALVAR_H_
- #define APPGLOBALVAR_H_
- #define APP_UART0_ENABLE
- //#define APP_CAN_ENABLE
- #include "hal_adapter.h"
- #define BATT_SN_LEN 17
- extern const uint32 AppSwVersion;
- extern const uint8 DataModuleType;
- extern const uint16 HwVersion;
- extern const uint32 BlSwVersion;
- extern const uint32 DrvSwVersion;
- extern const uint8 BmsManuFacture;
- extern const uint8 BmsInfo;
- extern bool TcpSysReboot;
- extern uint8 TcpbattSN[BATT_SN_LEN];
- extern uint8 VIN[17];
- extern volatile uint32 TimerCounter;
- extern uint8 Fota_update_flag;
- extern uint8 Fota_error_flag;
- typedef struct
- {
- uint8 RealLen;
- uint8 *DataPtr;
- } QueueDataTrans_Type;
- /*GPS*/
- extern QueueHandle_t GpsDataQueueHandle;
- extern sint16 xyzData[3];
- /*Hal_Can*/
- extern uint8 CanIf_u8TxConfirmCnt;
- extern boolean CanIf_bTxFlag;
- extern uint8 CanIf_u8RxIndicationCnt;
- extern boolean CanIf_bRxFlag;
- extern QueueHandle_t CanRecvQueueHandle;
- extern uint8 CSQValue;
- extern sint8 SocketId;
- extern sint8 RegChkRet;
- extern char WebSiteIp[20];
- extern const char WebSiteName[];
- extern uint16 WebSitePort;
- extern char ImeiNum[15];
- extern char IccidNum[20];
- extern uint8 TcpWorkState;
- typedef struct _AppEppType
- {
- uint32 battDischrgAccCap; //单位maH
- uint32 battDischrgAccEnrg; //单位wh
- uint32 battChrgAccEnrg; //单位wh
- uint16 battCycleTimes;
- } AppEppBody;
- typedef struct _AppConfigType
- {
- bool appSaveFlg;
- bool eolFlg;
- uint8 deviceSn[17];
- AppEppBody AppDataInfo;
- uint8 re[20];
- } AppConfigBody;
- extern AppConfigBody AppConfigInfo;
- #define BMS_CELLNUM 120
- #define BMS_TEMPNUM 40
- typedef struct _AppDataType
- {
- uint8 BattCellCount;
- uint8 BattTempCount;
- } AppDataBody;
- extern AppDataBody AppDataInfo;
- extern uint16 avrgCellVol;
- extern uint16 battCellU[BMS_CELLNUM];
- extern uint16 battI;
- extern uint16 bmsHwVersion;
- extern uint32 bmsSwVersion;
- extern uint16 battPackVol;
- extern uint16 maxCellVol;
- extern uint16 minCellVol;
- // extern uint16 socd_pct_vcuSoc;
- // extern uint16 sohd_pct_bcuSoh;
- extern uint32 battBalanceoInfo;
- extern uint32 battProtectState;
- extern uint32 battWarningState;
- extern uint8 AvgBattTemp;
- extern uint8 battCellTemp[BMS_TEMPNUM];
- extern uint8 Battdesigncap;
- extern uint8 battHeatEnableState;
- extern uint8 battMOSSwitchState;
- extern uint8 battSOC;
- extern uint8 battSOH;
- extern uint8 battWorkState;
- extern uint8 BmsOtherTemp;
- extern uint8 maxCellTemp;
- extern uint8 minCellTemp;
- extern uint8 OtherTemp;
- extern uint8 battHeatState;
- extern uint8 battFanState;
- extern uint8 battRelayState;
- extern uint8 battConverState;
- extern uint8 battSeparateEnable;
- extern uint8 battSeparateCtlState;
- extern uint8 battSeparateState;
- extern uint16 ErrorArray[5];
- extern uint32 meterAllPwr[2];
- extern uint32 meterPosPwr[2];
- extern uint32 meterNegPwr[2];
- extern uint32 BattTempR[4];
- extern uint32 battAccEnrg;
- extern uint32 battAccCap;
- extern uint16 battAccUseTimes;
- #endif /* APPGLOBALVAR_H_ */
|