Commit 96634667 authored by 陈家乐's avatar 陈家乐

🐞 fix:故障码改为32位

parent 9865a1f5
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
//static uint8_t u8FaultCodeValid = 0; //static uint8_t u8FaultCodeValid = 0;
FaultCodeList_t FaultCode_t; FaultCodeList_t FaultCode_t;
uint16_t FaultCodeList [MaxFaultCode]; uint32_t FaultCodeList [MaxFaultCode];
uint32_t Get_FaultCodeDtc1(void) uint32_t Get_FaultCodeDtc1(void)
{ {
...@@ -347,7 +347,7 @@ void FaultCode_Service(uint16_t Cycle) ...@@ -347,7 +347,7 @@ void FaultCode_Service(uint16_t Cycle)
#if 1 #if 1
uint8_t List_Init(FaultCodeList_t *CodeList, uint16_t Arr[], uint8_t Len) uint8_t List_Init(FaultCodeList_t *CodeList, uint32_t Arr[], uint8_t Len)
{ {
if((CodeList == NULL) || (Arr == NULL)) if((CodeList == NULL) || (Arr == NULL))
{ {
...@@ -366,7 +366,7 @@ uint8_t List_Init(FaultCodeList_t *CodeList, uint16_t Arr[], uint8_t Len) ...@@ -366,7 +366,7 @@ uint8_t List_Init(FaultCodeList_t *CodeList, uint16_t Arr[], uint8_t Len)
return 0; return 0;
} }
uint8_t List_Find(FaultCodeList_t *CodeList, uint16_t FaultCode) uint8_t List_Find(FaultCodeList_t *CodeList, uint32_t FaultCode)
{ {
if(CodeList == NULL) if(CodeList == NULL)
{ {
...@@ -382,7 +382,7 @@ uint8_t List_Find(FaultCodeList_t *CodeList, uint16_t FaultCode) ...@@ -382,7 +382,7 @@ uint8_t List_Find(FaultCodeList_t *CodeList, uint16_t FaultCode)
return 0; return 0;
} }
uint8_t List_add(FaultCodeList_t *CodeList, uint16_t FaultCode) uint8_t List_add(FaultCodeList_t *CodeList, uint32_t FaultCode)
{ {
if(CodeList == NULL) if(CodeList == NULL)
{ {
...@@ -459,7 +459,7 @@ void FaultCode_Servers(void) ...@@ -459,7 +459,7 @@ void FaultCode_Servers(void)
} }
uint16_t List_Display(FaultCodeList_t *CodeList, uint16_t *TimeCount) uint32_t List_Display(FaultCodeList_t *CodeList, uint16_t *TimeCount)
{ {
if((CodeList == NULL) || (TimeCount == NULL)) if((CodeList == NULL) || (TimeCount == NULL))
{ {
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
typedef struct __attribute__((aligned(4))) typedef struct __attribute__((aligned(4)))
{ {
uint16_t *code_list; uint32_t *code_list;
uint8_t hade; uint8_t hade;
uint8_t tail; uint8_t tail;
uint8_t code_num; uint8_t code_num;
...@@ -67,7 +67,7 @@ typedef struct __attribute__((aligned(4))) ...@@ -67,7 +67,7 @@ typedef struct __attribute__((aligned(4)))
extern uint32_t Get_Current_FaultCode(void); extern uint32_t Get_Current_FaultCode(void);
//extern uint8_t Get_FaultCode_Valid(void); //extern uint8_t Get_FaultCode_Valid(void);
uint8_t List_Init(FaultCodeList_t *CodeList, uint16_t Arr[], uint8_t Len); uint8_t List_Init(FaultCodeList_t *CodeList, uint32_t Arr[], uint8_t Len);
void FaultCode_Servers(void); void FaultCode_Servers(void);
#endif #endif
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment