-
Notifications
You must be signed in to change notification settings - Fork 5.3k
feat[can][gd32]: Implement non-blocking send mechanism #10796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -662,12 +662,74 @@ static rt_ssize_t _can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t | |||||
| return RT_EOK; | ||||||
| } | ||||||
|
|
||||||
| rt_ssize_t _can_get_freebox(rt_uint32_t can_x) | ||||||
| { | ||||||
| rt_uint32_t freebox = 0; | ||||||
| if ((CAN_STAT(can_x) & CAN_TSTAT_TME0) != 0U) | ||||||
| { | ||||||
| freebox++; | ||||||
| } | ||||||
| if ((CAN_STAT(can_x) & CAN_TSTAT_TME1) != 0U) | ||||||
| { | ||||||
| freebox++; | ||||||
| } | ||||||
| if ((CAN_STAT(can_x) & CAN_TSTAT_TME2) != 0U) | ||||||
| { | ||||||
| freebox++; | ||||||
| } | ||||||
| return freebox; | ||||||
| } | ||||||
|
|
||||||
| rt_ssize_t _can_sendmsg_nonblocking(struct rt_can_device *can, const void *buf) | ||||||
| { | ||||||
| RT_ASSERT(can); | ||||||
|
|
||||||
| can_trasnmit_message_struct transmit_message; | ||||||
|
||||||
| can_trasnmit_message_struct transmit_message; | |
| can_transmit_message_struct transmit_message; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也修改下吧,很有用
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
官方的编码规范问题,出现过很多次了,需要注意下其他系列是不是也有这个问题,然后从rtt的软件包中统一一下命名

There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不同函数后需要加一个换行
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
已修改