-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[CAN]update struct can_filter_item and rt_can_msg #6556
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
Conversation
- 删除TX中断函数else分支。仅当RQCP位 置一才进入该中断 - 添加SCE中断函数中关于ACK_ERR的else判断。自动重传模式下会进入该判断,打断自动重传释放完成量。
1. 对过滤器号和索引号结构体定义中同一名称hdr进行重命名hdr_bank和hdr_index, 以便准确区分.采用宏定义兼容以前变量名. 2. 添加接收标识rxfifo,已指明是哪个RXFIFO.
| rt_uint32_t mode : 1; | ||
| rt_uint32_t mask; | ||
| rt_int32_t hdr; | ||
| rt_int32_t hdr_bank;/*Should be defined as:rx.FilterBank,which should be changed to rt_int32_t hdr_bank*/ |
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.
改了这个,其他的bsp的驱动就不能用了啊
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.
是不是把其他bsp的驱动也改了
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.
hello,大佬们,打扰请教一下。
直接对can.h进行一些类似的调整是否风险太大啊。
#define CAN_RX_FIFO0 (0x00000000U) /*!< CAN receive FIFO 0 /
#define CAN_RX_FIFO1 (0x00000001U) /!< CAN receive FIFO 1 */
接收fifo number的宏定义区分是否应该在各自的底层库中自行进行处理,因各家设计的做法都不尽相同,fifo数量可能只有一个,可能两个,或者更多。
该处统一定义在can框架内,如果各家的底层库中又自行在处理,且命名一样,采用枚举方式定义的就会编译报错。目前发现的at32/esp32采用枚举方式的应该会出现问题。
typedef enum {
CAN_RX_FIFO0 = 0x0U, /< CAN fifo 0 used to receive */
CAN_RX_FIFO1 = 0x1U, /< CAN fifo 1 used to receive */
} can_rx_fifo_t;
另外虽然每次的上传都会有自动check机制,但仿佛都是check的bsp默认配置状态,一些外设驱动并未开启,感觉对这种外设根源性调整的点覆盖不全。
以上仅个人浅见。谢谢
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.
拉取/合并请求描述:(PR description)
[
为什么提交这份PR:
解决的问题是什么
为什么提交这份PR:
解决的问题是什么
并确认并列出已经在什么情况或板卡上进行了测试。
参考
BSP修改的代码
以下的内容不应该在提交PR时的message修改,修改下述message,PR会被直接关闭。请在提交PR后,浏览器查看PR并对以下检查项逐项check,没问题后逐条在页面上打钩。
The following content must not be changed in the submitted PR message. Otherwise, the PR will be closed immediately. After submitted PR, please use a web browser to visit PR, and check items one by one, and ticked them if no problem.
当前拉取/合并请求的状态 Intent for your PR
必须选择一项 Choose one (Mandatory):
代码质量 Code Quality:
我在这个拉取/合并请求中已经考虑了 As part of this pull request, I've considered the following:
#if 0代码,不包含已经被注释了的代码 All redundant code is removed and cleaned up