AppGlobalVar.h 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. /***
  2. * @Author: chenjie
  3. * @Date: 2022-06-06
  4. * @LastEditTime: 2022-10-27
  5. * @LastEditors: chenjie
  6. * @Description:
  7. * @FilePath: \S32K146_4G\code\app\AppGlobalVar.h
  8. * @Copyright (c) 2022 by chenjie, All Rights Reserved.
  9. */
  10. #ifndef APPGLOBALVAR_H_
  11. #define APPGLOBALVAR_H_
  12. #define APP_UART0_ENABLE
  13. //#define APP_CAN_ENABLE
  14. #include "hal_adapter.h"
  15. #define BATT_SN_LEN 17
  16. extern const uint32 AppSwVersion;
  17. extern const uint8 DataModuleType;
  18. extern const uint16 HwVersion;
  19. extern const uint32 BlSwVersion;
  20. extern const uint32 DrvSwVersion;
  21. extern const uint8 BmsManuFacture;
  22. extern const uint8 BmsInfo;
  23. extern bool TcpSysReboot;
  24. extern uint8 TcpbattSN[BATT_SN_LEN];
  25. extern uint8 VIN[17];
  26. extern volatile uint32 TimerCounter;
  27. extern uint8 Fota_update_flag;
  28. extern uint8 Fota_error_flag;
  29. typedef struct
  30. {
  31. uint8 RealLen;
  32. uint8 *DataPtr;
  33. } QueueDataTrans_Type;
  34. /*GPS*/
  35. extern QueueHandle_t GpsDataQueueHandle;
  36. extern sint16 xyzData[3];
  37. /*Hal_Can*/
  38. extern uint8 CanIf_u8TxConfirmCnt;
  39. extern boolean CanIf_bTxFlag;
  40. extern uint8 CanIf_u8RxIndicationCnt;
  41. extern boolean CanIf_bRxFlag;
  42. extern QueueHandle_t CanRecvQueueHandle;
  43. extern uint8 CSQValue;
  44. extern sint8 SocketId;
  45. extern sint8 RegChkRet;
  46. extern char WebSiteIp[20];
  47. extern const char WebSiteName[];
  48. extern uint16 WebSitePort;
  49. extern char ImeiNum[15];
  50. extern char IccidNum[20];
  51. extern uint8 TcpWorkState;
  52. typedef struct _AppEppType
  53. {
  54. uint32 battDischrgAccCap; //单位maH
  55. uint32 battDischrgAccEnrg; //单位wh
  56. uint32 battChrgAccEnrg; //单位wh
  57. uint16 battCycleTimes;
  58. } AppEppBody;
  59. typedef struct _AppConfigType
  60. {
  61. bool appSaveFlg;
  62. bool eolFlg;
  63. uint8 deviceSn[17];
  64. AppEppBody AppDataInfo;
  65. uint8 re[20];
  66. } AppConfigBody;
  67. extern AppConfigBody AppConfigInfo;
  68. #define BMS_CELLNUM 120
  69. #define BMS_TEMPNUM 40
  70. typedef struct _AppDataType
  71. {
  72. uint8 BattCellCount;
  73. uint8 BattTempCount;
  74. } AppDataBody;
  75. extern AppDataBody AppDataInfo;
  76. extern uint16 avrgCellVol;
  77. extern uint16 battCellU[BMS_CELLNUM];
  78. extern uint16 battI;
  79. extern uint16 bmsHwVersion;
  80. extern uint32 bmsSwVersion;
  81. extern uint16 battPackVol;
  82. extern uint16 maxCellVol;
  83. extern uint16 minCellVol;
  84. // extern uint16 socd_pct_vcuSoc;
  85. // extern uint16 sohd_pct_bcuSoh;
  86. extern uint32 battBalanceoInfo;
  87. extern uint32 battProtectState;
  88. extern uint32 battWarningState;
  89. extern uint8 AvgBattTemp;
  90. extern uint8 battCellTemp[BMS_TEMPNUM];
  91. extern uint8 Battdesigncap;
  92. extern uint8 battHeatEnableState;
  93. extern uint8 battMOSSwitchState;
  94. extern uint8 battSOC;
  95. extern uint8 battSOH;
  96. extern uint8 battWorkState;
  97. extern uint8 BmsOtherTemp;
  98. extern uint8 maxCellTemp;
  99. extern uint8 minCellTemp;
  100. extern uint8 OtherTemp;
  101. extern uint8 battHeatState;
  102. extern uint8 battFanState;
  103. extern uint8 battRelayState;
  104. extern uint8 battConverState;
  105. extern uint8 battSeparateEnable;
  106. extern uint8 battSeparateCtlState;
  107. extern uint8 battSeparateState;
  108. extern uint16 ErrorArray[5];
  109. extern uint32 meterAllPwr[2];
  110. extern uint32 meterPosPwr[2];
  111. extern uint32 meterNegPwr[2];
  112. extern uint32 BattTempR[4];
  113. extern uint32 battAccEnrg;
  114. extern uint32 battAccCap;
  115. extern uint16 battAccUseTimes;
  116. #endif /* APPGLOBALVAR_H_ */