12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- /****************************************************************************
- *
- * Copy right: RL.Chen J and Zhen C
- * File name: AppFunc.h
- * Description: 应用层函数调用文件
- * History: 2021-07-15
- * Version: V3.0
- ****************************************************************************/
- #include "flash_ec616_rt.h"
- #include "commontypedef.h"
- #include "flash_ec616_rt.h"
- #include "mem_map.h"
- #include "AppConfig.h"
- #include "ec_tcpip_api.h"
- #include "AppSignal.h"
- #define FLASH_BMS_FOTA_START_ADDR 0x2E6000 //BMS升级文件存储起始地址
- #define FLASH_BMS_FOTA_LEN 0x32000 //BMS升级文件存储长度 = =200k
- #define FLASH_BMS_FOTA_END_ADDR 0x318000 //BMS升级文件存储结束地址
- typedef struct _Fota_Type
- {
- BOOL Fota_update_error ;
- UINT32 Fota_All_Data_Len ;
- UINT32 Fota_Current_Addres ;
- UINT8 Fota_Recv_Data_Len ;
- UINT8 Fota_Recv_Data[100] ;
- UINT32 Fota_Flash_Addres;
- UINT8 Fota_CRC ;
- }Fota_Type;
- BOOL uartBattInfoDecode(UINT8* dataPtr);
- static UINT8 BmsErrorDecode(UINT32 battWarningState);
- UINT16 GetErrorNum(UINT16 *ErrorArray,UINT8 Errorlen);
- UINT8 PutErrorNum(UINT16 *ErrorArray,UINT8 Errorlen,UINT16 ErrorNum);
- void SaveAppData(void);
- void LoadAppData(void);
- void SaveAppConfig(void);
- void LoadAppConfig(void);
- static void setDefaultAppConfigData(void);
- static void setDefaultAppDataInfo(void);
- UINT16 encryptionAlgorithm (UINT16 plainText);
|