/**************************************************************************** * * Copy right: RL.Chen J and Zhen C * File name: AppFunc.h * Description: 应用层函数调用文件 * History: 2021-07-15 * Version: V3.0 ****************************************************************************/ #include "hal_module_adapter.h" #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" 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; UINT8 bcc_chk(UINT8* data, UINT16 length); void LEDDisplay(void); 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); void TcpDataAssemble(UINT8 Tcptype,UINT8 *SendBuffer,UTC8TimeType UTC8TimeTcp); void canRxMsgSetInvalidValue(UINT32 ID); void Fota_Func(UINT8 *DataPtr,INT32 connectId); static UINT8 bcc_chk_fota(UINT8* data, UINT8 length); static UINT8 Fota_crc_chk(UINT8* data,UINT8 length); void DecodeFunction(UINT32 ID,UINT8* rawData); UINT8 canCOMInTableIndexFind(UINT32 canID);