123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- /****************************************************************************
- *
- * 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);
- void canRxDiagnose(void);
- UINT8 canCOMInTableIndexFind(UINT32 canID);
- void canRxMsgSetInvalidValue(UINT32 ID);
- BOOL snCodeCompare(UINT8* savedSN, UINT8* receivedSN);
- void UDS_Service(CAN_Msg_Type* CanRxMsg);
- UINT8 UDSPositiveAnswer(UINT8 answerLen,UINT8 messageIndex,UINT32 posCode);
- UINT8 UDSNegtiveAnswer(UINT8 answerLen,UINT8 messageIndex, UINT32 negCode);
- BOOL UDSAskforDownLoadData();
- BOOL UDSClearFotaDownloadRegion();
- void CANEncodeFunction(UINT32 ID,UINT8* msgData);
- BOOL VINCodeCompare(UINT8* saveVIN, UINT8* receivedVIN);
- void canTxTest(void);
|