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
741d792b
Commit
741d792b
authored
May 07, 2022
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整K-LINEBUG
parent
09c8f60b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
65 additions
and
55 deletions
+65
-55
kwp2000_protocol.c
source/Application/K_BUS/kwp2000_protocol.c
+64
-55
tasks.c
source/System/tasks.c
+1
-0
No files found.
source/Application/K_BUS/kwp2000_protocol.c
View file @
741d792b
...
...
@@ -84,61 +84,70 @@ void Kwp2000_CallService(unsigned char Sid_u8)
}
}
#endif
for
(
index
=
0
;
index
<
12
;
index
++
)
switch
(
Sid_u8
)
{
switch
(
Sid_u8
)
{
case
KWP2000_ECURESET_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_EcuReset
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_TESTERPRESENT_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_TesterPresent
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_STARTCOMMUNICATION_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_StartCommunication
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_STOPCOMMUNICATION_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_StopCommunication
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READECUIDENTIFICATION_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_readEcuIdentification
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_WRITEDATABYLOCALIDENTIFIER_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_writeDataByLocalIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READDATABYLOCALIDENTIFIER_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_readDataByLocalIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READDATABYCOMMONIDENTIFIER_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_readDataByCommonIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READDIAGNOSTICTROUBLECODESBYSTATUS_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_readDataStatusofDTC
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_CLEARDIAGNOSTICINFORMATION_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_ClearDiagnosticInformation
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_SECURITYACCESS_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_readDataAccessMode
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_STARTROUTINEBYLOCALIDENTIFIER_REQUEST
:
Kwp2000_ComState
.
Tx_len
=
kwp_StartroutInebykocalIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
default:
break
;
}
case
KWP2000_ECURESET_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_EcuReset
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_TESTERPRESENT_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_TesterPresent
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_STARTCOMMUNICATION_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_StartCommunication
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_STOPCOMMUNICATION_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_StopCommunication
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READECUIDENTIFICATION_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_readEcuIdentification
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_WRITEDATABYLOCALIDENTIFIER_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_writeDataByLocalIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READDATABYLOCALIDENTIFIER_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_readDataByLocalIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READDATABYCOMMONIDENTIFIER_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_readDataByCommonIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_READDIAGNOSTICTROUBLECODESBYSTATUS_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_readDataStatusofDTC
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_CLEARDIAGNOSTICINFORMATION_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_ClearDiagnosticInformation
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_SECURITYACCESS_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_readDataAccessMode
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
case
KWP2000_STARTROUTINEBYLOCALIDENTIFIER_REQUEST
:
serviceFound
=
1
;
Kwp2000_ComState
.
Tx_len
=
kwp_StartroutInebykocalIdentifier
((
unsigned
char
*
)
&
Kwp2000_ComState
.
TxBuffer
[
4
],
(
unsigned
char
*
)
&
Kwp2000_ComState
.
Request_Datas
[
1
]);
break
;
default:
break
;
}
if
(
serviceFound
==
0
)
...
...
@@ -244,7 +253,7 @@ void Kwp2000_Handle(void)
if
(
Kwp2000_ComState_Flag
>
7
)
{
Kwp2000_ComState_Flag
=
0
;
//
Kwp2000_CallService(Kwp2000_ComState.SId);
Kwp2000_CallService
(
Kwp2000_ComState
.
SId
);
}
if
(
Kwp2000_ComState
.
Tx_len
!=
0
)
...
...
source/System/tasks.c
View file @
741d792b
...
...
@@ -260,6 +260,7 @@ void Sys_Run_Mode_100ms_Tasks(void)
//YZHD_Count++;
//if (YZHD_Count == 20)
//{
// YZHD_Count = 0;
// UART_Ch2_Send_Multiple_Byte(&YZHD_TEST[0], 10);
//}
}
...
...
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