Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
V
VC66_7C
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ISUZU
VC66_7C
Commits
c477b0fe
Commit
c477b0fe
authored
Oct 15, 2023
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整硬线消抖时间
parent
c73e1db2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
57 deletions
+63
-57
Line_In_user.c
source/Application/APP/LINE_IN/Line_In_user.c
+27
-27
FlashCheckSum.c
source/Application/Graphic/GUI/FlashCheckSum.c
+36
-30
No files found.
source/Application/APP/LINE_IN/Line_In_user.c
View file @
c477b0fe
...
...
@@ -43,39 +43,39 @@ LINE_IN_TriggerLevel_en_t LINE_IN_Get_A20(void); /*A20 */
const
Line_In_Attribute_st_t
g_stLineInAttribute
[
LINE_IN_MAX
]
=
{
/*指示灯信号 硬线输入*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ABS
,},
/*A22 ABS*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_PARK_BRAKE
,},
/*A23 PARK BRAKE*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ABS
,},
/*A22 ABS*/
{
LINE_IN_LEVEL_LOW
,
5
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_PARK_BRAKE
,},
/*A23 PARK BRAKE*/
{
LINE_IN_LEVEL_HIGH
,
60U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_HI_BEAM
,},
/*A25 HI BEAM*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_BRAKE_AIR_EBS
,},
/*A28 BRAKE AIR/EBS*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_SEAT_BELT
,},
/*A30 SEAT BELT*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_MIL
,},
/*A31 MIL*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ENG_OIL
,},
/*A32 ENG OIL*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_CHARGE
,},
/*A34 CHARGE*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_ABS_INFO
,},
/*B03 TRAILER ABS INFO*/
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_Rr_FOG_LAMP
,},
/*B14 Rr FOG LAMP*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ACC_AIR
,},
/*B15 ACC AIR*/
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_AIR_SUS
,},
/*B30 AIR SUS*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_BRAKE
,},
/*B31 TRAILER BRAKE*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_ABS
,},
/*B33 TRAILER ABS*/
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_RR_DIFF_LOCK
,},
/*B36 RR DIFF LOCK*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_WEAR_IND
,},
/*B38 WEAR IND*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_BRAKE_AIR_EBS
,},
/*A28 BRAKE AIR/EBS*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_SEAT_BELT
,},
/*A30 SEAT BELT*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_MIL
,},
/*A31 MIL*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ENG_OIL
,},
/*A32 ENG OIL*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_CHARGE
,},
/*A34 CHARGE*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_ABS_INFO
,},
/*B03 TRAILER ABS INFO*/
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_Rr_FOG_LAMP
,},
/*B14 Rr FOG LAMP*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ACC_AIR
,},
/*B15 ACC AIR*/
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_AIR_SUS
,},
/*B30 AIR SUS*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_BRAKE
,},
/*B31 TRAILER BRAKE*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_ABS
,},
/*B33 TRAILER ABS*/
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_RR_DIFF_LOCK
,},
/*B36 RR DIFF LOCK*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_WEAR_IND
,},
/*B38 WEAR IND*/
/*非指示灯信号 硬线输入*/
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ILLUMINATION
,},
/*A06 ILLUMINATION 背光有效*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_RET_BLENDING
,},
/*A10 RET_BLENDING*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_BRAKE
,},
/*A21 BRAKE*/
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ILLUMINATION
,},
/*A06 ILLUMINATION 背光有效*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_RET_BLENDING
,},
/*A10 RET_BLENDING*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_BRAKE
,},
/*A21 BRAKE*/
{
LINE_IN_LEVEL_HIGH
,
20U
,
0U
,
LINE_IN_IG_ONOFF
,
LINE_IN_Get_TURN_R
,},
/*A26 TURN_R*/
{
LINE_IN_LEVEL_HIGH
,
20U
,
0U
,
LINE_IN_IG_ONOFF
,
LINE_IN_Get_TURN_L
,},
/*A27 TURN_L*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ABS_DETECT
,},
/*A33 ABS_DETECT*/
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_PTO
,},
/*B01 PTO*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_GLOW
,},
/*B05 GLOW*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_CONNECT
,},
/*B06 TRAILER_CONNECT*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ABS_DETECT
,},
/*A33 ABS_DETECT*/
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_PTO
,},
/*B01 PTO*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_GLOW
,},
/*B05 GLOW*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_TRAILER_CONNECT
,},
/*B06 TRAILER_CONNECT*/
{
LINE_IN_LEVEL_LOW
,
200U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_LOW_COOLANT
,},
/*B32 LOW_COOLANT*/
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ACC
,},
/*B39 ACC*/
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_WEAR2
,},
/*B40 WEAR2*/
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_A19
,},
/*A19 */
{
LINE_IN_LEVEL_HIGH
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_A03
,},
/*A03 */
{
LINE_IN_LEVEL_LOW
,
2
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_A20
,},
/*A20 */
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_ACC
,},
/*B39 ACC*/
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_WEAR2
,},
/*B40 WEAR2*/
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_A19
,},
/*A19 */
{
LINE_IN_LEVEL_HIGH
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_A03
,},
/*A03 */
{
LINE_IN_LEVEL_LOW
,
1
00U
,
0U
,
LINE_IN_IG_ON
,
LINE_IN_Get_A20
,},
/*A20 */
};
/*A22 ABS*/
...
...
source/Application/Graphic/GUI/FlashCheckSum.c
View file @
c477b0fe
...
...
@@ -4,39 +4,44 @@
static
unsigned
int
SwapData_32
(
unsigned
int
Data
)
{
unsigned
int
RetVal
=
Data
;
RetVal
=
((
RetVal
>>
1
)
&
0x55555555
)
|
((
RetVal
<<
1
)
&
0xaaaaaaaa
);
RetVal
=
((
RetVal
>>
2
)
&
0x33333333
)
|
((
RetVal
<<
2
)
&
0xcccccccc
);
RetVal
=
((
RetVal
>>
4
)
&
0x0f0f0f0f
)
|
((
RetVal
<<
4
)
&
0xf0f0f0f0
);
RetVal
=
((
RetVal
>>
8
)
&
0x00ff00ff
)
|
((
RetVal
<<
8
)
&
0xff00ff00
);
RetVal
=
((
RetVal
>>
16
)
&
0x0000ffff
)
|
((
RetVal
<<
16
)
&
0xffff0000
);
unsigned
int
RetVal
=
Data
;
RetVal
=
((
RetVal
>>
1
)
&
0x55555555
)
|
((
RetVal
<<
1
)
&
0xaaaaaaaa
);
RetVal
=
((
RetVal
>>
2
)
&
0x33333333
)
|
((
RetVal
<<
2
)
&
0xcccccccc
);
RetVal
=
((
RetVal
>>
4
)
&
0x0f0f0f0f
)
|
((
RetVal
<<
4
)
&
0xf0f0f0f0
);
RetVal
=
((
RetVal
>>
8
)
&
0x00ff00ff
)
|
((
RetVal
<<
8
)
&
0xff00ff00
);
RetVal
=
((
RetVal
>>
16
)
&
0x0000ffff
)
|
((
RetVal
<<
16
)
&
0xffff0000
);
return
RetVal
;
return
RetVal
;
}
unsigned
int
CRC32_VAL
;
static
void
CheckCrc32
(
unsigned
char
*
buf
,
int
len
)
{
int
i
;
int
n
=
0
;
unsigned
char
tmp
=
0
;
unsigned
int
crc
=
CRC32_VAL
;
// Initial value
for
(
n
=
0
;
n
<
len
;
n
++
)
{
tmp
=
buf
[
n
];
tmp
=
(
tmp
>>
4
)
|
(
tmp
<<
4
);
tmp
=
(((
tmp
&
0xcc
)
>>
2
)
|
((
tmp
&
0x33
)
<<
2
));
tmp
=
(((
tmp
&
0xaa
)
>>
1
)
|
((
tmp
&
0x55
)
<<
1
));
crc
^=
(
unsigned
int
)(
tmp
)
<<
24
;
for
(
i
=
0
;
i
<
8
;
++
i
)
{
if
(
crc
&
0x80000000L
)
{
crc
=
(
crc
<<
1
)
^
0x04C11DB7
;
}
else
{
crc
<<=
1
;
}
}
}
int
i
;
int
n
=
0
;
unsigned
char
tmp
=
0
;
unsigned
int
crc
=
CRC32_VAL
;
// Initial value
for
(
n
=
0
;
n
<
len
;
n
++
)
{
tmp
=
buf
[
n
];
tmp
=
(
tmp
>>
4
)
|
(
tmp
<<
4
);
tmp
=
(((
tmp
&
0xcc
)
>>
2
)
|
((
tmp
&
0x33
)
<<
2
));
tmp
=
(((
tmp
&
0xaa
)
>>
1
)
|
((
tmp
&
0x55
)
<<
1
));
crc
^=
(
unsigned
int
)(
tmp
)
<<
24
;
for
(
i
=
0
;
i
<
8
;
++
i
)
{
if
(
crc
&
0x80000000L
)
{
crc
=
(
crc
<<
1
)
^
0x04C11DB7
;
}
else
{
crc
<<=
1
;
}
}
}
CRC32_VAL
=
crc
;
return
;
return
;
}
...
...
@@ -63,15 +68,16 @@ unsigned char CheckSpiFlashCRC(void)
CheckCrc
=
DCRA0COUT
;
}
tmp
=
*
((
unsigned
int
*
)(
CheckCrcAddr
+
(
i
*
4
)));
if
(
BinCrcLen
%
4
!=
0u
)
{
if
(
BinCrcLen
%
4
!=
0u
)
{
CheckCrc
=
CheckCrc
^
0xffffffff
;
CheckCrc
=
SwapData_32
(
CheckCrc
);
CRC32_VAL
=
CheckCrc
;
CheckCrc32
(
&
tmp
,
BinCrcLen
%
4
);
CheckCrc
=
SwapData_32
(
CRC32_VAL
);
CheckCrc
=
CheckCrc
^
0xffffffff
;
CheckCrc
=
SwapData_32
(
CRC32_VAL
);
CheckCrc
=
CheckCrc
^
0xffffffff
;
}
if
(
CheckCrc
==
BinCrc
)
{
TmpRet
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment