|
@@ -1,11 +1,12 @@
|
|
-/****************************************************************************
|
|
|
|
- *
|
|
|
|
- * Copy right: RL.Chen J and Zhen C
|
|
|
|
- * File name: AppFunc.h
|
|
|
|
- * Description: 应用层函数调用文件
|
|
|
|
- * History: 2021-07-15
|
|
|
|
- * Version: V3.0
|
|
|
|
- ****************************************************************************/
|
|
|
|
|
|
+/*
|
|
|
|
+ * @Author : ChenJie
|
|
|
|
+ * @Date : 2021-11-09 12:08:17
|
|
|
|
+ * @Version : V3.0
|
|
|
|
+ * @LastEditors : ChenJie
|
|
|
|
+ * @LastEditTime : 2021-11-23 19:08:59
|
|
|
|
+ * @Description : file content
|
|
|
|
+ * @FilePath : \PLAT\project\ec616_0h00\apps\qx_app\inc\AppFunc.h
|
|
|
|
+ */
|
|
#include "hal_module_adapter.h"
|
|
#include "hal_module_adapter.h"
|
|
#include "flash_ec616_rt.h"
|
|
#include "flash_ec616_rt.h"
|
|
#include "commontypedef.h"
|
|
#include "commontypedef.h"
|
|
@@ -13,45 +14,44 @@
|
|
#include "mem_map.h"
|
|
#include "mem_map.h"
|
|
#include "AppConfig.h"
|
|
#include "AppConfig.h"
|
|
#include "ec_tcpip_api.h"
|
|
#include "ec_tcpip_api.h"
|
|
-#include "AppSignal.h"
|
|
|
|
|
|
+#include "AppSignal.h"
|
|
typedef struct _Fota_Type
|
|
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 ;
|
|
|
|
|
|
+ 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);
|
|
|
|
|
|
+} Fota_Type;
|
|
|
|
+UINT8 bcc_chk(UINT8 *data, UINT16 length);
|
|
void LEDDisplay(void);
|
|
void LEDDisplay(void);
|
|
-UINT16 GetErrorNum(UINT16 *ErrorArray,UINT8 Errorlen);
|
|
|
|
-UINT8 PutErrorNum(UINT16 *ErrorArray,UINT8 Errorlen,UINT16 ErrorNum);
|
|
|
|
|
|
+UINT16 GetErrorNum(UINT16 *ErrorArray, UINT8 Errorlen);
|
|
|
|
+UINT8 PutErrorNum(UINT16 *ErrorArray, UINT8 Errorlen, UINT16 ErrorNum);
|
|
void SaveAppData(void);
|
|
void SaveAppData(void);
|
|
void LoadAppData(void);
|
|
void LoadAppData(void);
|
|
void SaveAppConfig(void);
|
|
void SaveAppConfig(void);
|
|
void LoadAppConfig(void);
|
|
void LoadAppConfig(void);
|
|
static void setDefaultAppConfigData(void);
|
|
static void setDefaultAppConfigData(void);
|
|
static void setDefaultAppDataInfo(void);
|
|
static void setDefaultAppDataInfo(void);
|
|
-void TcpDataAssemble(UINT8 Tcptype,UINT8 *SendBuffer,UTC8TimeType UTC8TimeTcp);
|
|
|
|
|
|
+void TcpDataAssemble(UINT8 Tcptype, UINT8 *SendBuffer, UTC8TimeType UTC8TimeTcp);
|
|
void canRxMsgSetInvalidValue(UINT32 ID);
|
|
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 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);
|
|
void canRxDiagnose(void);
|
|
UINT8 canCOMInTableIndexFind(UINT32 canID);
|
|
UINT8 canCOMInTableIndexFind(UINT32 canID);
|
|
void canRxMsgSetInvalidValue(UINT32 ID);
|
|
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 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 UDSAskforDownLoadData();
|
|
BOOL UDSClearFotaDownloadRegion();
|
|
BOOL UDSClearFotaDownloadRegion();
|
|
-void CANEncodeFunction(UINT32 ID,UINT8* msgData);
|
|
|
|
-BOOL VINCodeCompare(UINT8* saveVIN, UINT8* receivedVIN);
|
|
|
|
|
|
+void CANEncodeFunction(UINT32 ID, UINT8 *msgData);
|
|
|
|
+BOOL VINCodeCompare(UINT8 *saveVIN, UINT8 *receivedVIN);
|
|
void canTxTest(void);
|
|
void canTxTest(void);
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+void canRxMsgSetInitValue(void);
|