AppFunc.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. /****************************************************************************
  2. *
  3. * Copy right: RL.Chen J and Zhen C
  4. * File name: AppFunc.h
  5. * Description: 应用层函数调用文件
  6. * History: 2021-07-15
  7. * Version: V3.0
  8. ****************************************************************************/
  9. #include "hal_module_adapter.h"
  10. #include "flash_ec616_rt.h"
  11. #include "commontypedef.h"
  12. #include "flash_ec616_rt.h"
  13. #include "mem_map.h"
  14. #include "AppConfig.h"
  15. #include "ec_tcpip_api.h"
  16. #include "AppSignal.h"
  17. typedef struct _Fota_Type
  18. {
  19. BOOL Fota_update_error ;
  20. UINT32 Fota_All_Data_Len ;
  21. UINT32 Fota_Current_Addres ;
  22. UINT8 Fota_Recv_Data_Len ;
  23. UINT8 Fota_Recv_Data[100] ;
  24. UINT32 Fota_Flash_Addres;
  25. UINT8 Fota_CRC ;
  26. }Fota_Type;
  27. UINT8 bcc_chk(UINT8* data, UINT16 length);
  28. void LEDDisplay(void);
  29. UINT16 GetErrorNum(UINT16 *ErrorArray,UINT8 Errorlen);
  30. UINT8 PutErrorNum(UINT16 *ErrorArray,UINT8 Errorlen,UINT16 ErrorNum);
  31. void SaveAppData(void);
  32. void LoadAppData(void);
  33. void SaveAppConfig(void);
  34. void LoadAppConfig(void);
  35. static void setDefaultAppConfigData(void);
  36. static void setDefaultAppDataInfo(void);
  37. void TcpDataAssemble(UINT8 Tcptype,UINT8 *SendBuffer,UTC8TimeType UTC8TimeTcp);
  38. void canRxMsgSetInvalidValue(UINT32 ID);
  39. void Fota_Func(UINT8 *DataPtr,INT32 connectId);
  40. static UINT8 bcc_chk_fota(UINT8* data, UINT8 length);
  41. static UINT8 Fota_crc_chk(UINT8* data,UINT8 length);
  42. void DecodeFunction(UINT32 ID,UINT8* rawData);
  43. UINT8 canCOMInTableIndexFind(UINT32 canID);