Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
TianYing_ty100
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
TY
TianYing_ty100
Commits
0b9b575e
Commit
0b9b575e
authored
Sep 10, 2024
by
陈家乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
🐞
fix:代码评审问题:部分结构体成员未初始化,已更改
parent
9a6afa98
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Can_User.c
Firmware/Source/Application/CAN_User/Can_User.c
+8
-0
No files found.
Firmware/Source/Application/CAN_User/Can_User.c
View file @
0b9b575e
...
...
@@ -35,6 +35,10 @@ void Can_Init(void)
*/
void
Can_RX_Apply_Buff
(
void
)
{
CAN_RecvMsg
.
DLC
=
8
;
CAN_RecvMsg
.
Data
=
{
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
};
CAN_RecvMsg
.
OverWriteConfig
=
0
;
CAN_RecvMsg
.
Id
=
0x101
;
CAN_RecvMsg
.
IDE
=
CAN_Id_Standard
;
CAN_RecvMsg
.
CacheType
=
CAN_CacheType_Rx_NoMask
;
...
...
@@ -245,6 +249,10 @@ void CAN_TX_Init(void)
memset
(
pTXBuff
,
0
,
sizeof
(
pTXBuff
));
CAN_CH0_CanMsgTxOp
.
CanMsg
=
(
st_CAN_SendOperation
*
)
pTXBuff
;
CAN_CH0_CanMsgTxOp
.
st_CAN_SendAttribute
=
CAN_CH0_CANSendAttr
;
CAN_CH0_CanMsgTxOp
.
Total_Msg
=
CAN_CH0_ID_SEND_TOTAL
;
CAN_CH0_CanMsgTxOp
.
Can_Write
=
COM_APP_Process
;
CAN_CH0_CanMsgTxOp
.
u8CAN_TX_ENABLE
=
CAN_N_TX_Disable
;
Can_TX_BuffInit
(
&
CAN_CH0_CanMsgTxOp
,
CAN_CH0_CANSendAttr
,
CAN_CH0_ID_SEND_TOTAL
,
COM_APP_Process
);
CAN_TX_SetEnable
(
&
CAN_CH0_CanMsgTxOp
,
CAN_N_TX_Disable
);
...
...
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