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
b3e26d59
Commit
b3e26d59
authored
May 10, 2022
by
hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加K-LINE 波特率配置功能
parent
0963d6d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
5 deletions
+13
-5
RTE_CAN.c
source/Application/RTE/RTE_CAN.c
+13
-5
No files found.
source/Application/RTE/RTE_CAN.c
View file @
b3e26d59
...
...
@@ -40,7 +40,14 @@ void Can_Init(void)
RSCAN0_Config_st_t
CANLLCCh0Filter
;
CANLLCCh0Filter
.
stRSCANCh0
.
u32RSCANChEn
=
1u
;
/*通道是否使能*/
CANLLCCh0Filter
.
stRSCANCh0
.
enRSCANChBps
=
RSCAN_Baud_Rate_500K
;
/*通道波特率*/
if
(
K_Line_Set
.
K_Line_LID52
==
0x00u
)
{
CANLLCCh0Filter
.
stRSCANCh0
.
enRSCANChBps
=
RSCAN_Baud_Rate_500K
;
/*通道波特率*/
}
else
if
(
K_Line_Set
.
K_Line_LID52
==
0x01u
)
{
CANLLCCh0Filter
.
stRSCANCh0
.
enRSCANChBps
=
RSCAN_Baud_Rate_250K
;
/*通道波特率*/
}
CANLLCCh0Filter
.
stRSCANCh0
.
u32RSCANChRuleSize
=
CANFD0_CH0_RX_RULE_SIZE
;
/*通道接收规则条数*/
CANLLCCh0Filter
.
stRSCANCh0
.
pfnRSCANConfirmCallBack
=
Can_Confirm
;
/*发送确认*/
CANLLCCh0Filter
.
stRSCANCh0
.
pfnRSCANAbortConfirmCallBack
=
0u
;
/*发送中止确认*/
...
...
@@ -60,13 +67,13 @@ void Can_Init(void)
CANLLCCh0Filter
.
stRSCANCh2
.
pfnRSCANAbortConfirmCallBack
=
0u
;
/*发送中止确认*/
CANLLCCh0Filter
.
stRSCANCh2
.
pfnRSCANReadMsgCallBack
=
Can_Read_Msg2
;
/*接收完成*/
CANSTB_OUT
=
1U
;
/
/CANSTB_OUT
CANSTB2_OUT
=
1U
;
/
/CANSTB2_OUT
CANSTB_OUT
=
1U
;
/
*CANSTB_OUT*/
CANSTB2_OUT
=
1U
;
/
*CANSTB2_OUT*/
RSCAN0_CH_Init
(
CANFD_RX_RULE_TABLE_LIST
,
&
CANLLCCh0Filter
);
CANSTB_OUT
=
0U
;
/
/CANSTB_OUT
CANSTB2_OUT
=
0U
;
/
/CANSTB2_OUT
CANSTB_OUT
=
0U
;
/
*CANSTB_OUT*/
CANSTB2_OUT
=
0U
;
/
*CANSTB2_OUT*/
}
void
Can_DeInit
(
void
)
...
...
@@ -236,4 +243,5 @@ void CAN_BUSOFF_Recover(void)
{
//CH0_BusOff_Recovery();
RSCAN0_CH0_Busoff_Recover
();
RSCAN0_CH2_Busoff_Recover
();
}
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