mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-21 02:06:14 +08:00
[CAN]update struct can_filter_item and rt_can_msg (#6556)
* 修改ry命令,已便于自定义保存路径 * modified: components/utilities/ymodem/ry_sy.c * 修复从被动错误恢复后发送返回异常 * 修复在自动重传模式下,ACK异常阻塞线程 - 删除TX中断函数else分支。仅当RQCP位 置一才进入该中断 - 添加SCE中断函数中关于ACK_ERR的else判断。自动重传模式下会进入该判断,打断自动重传释放完成量。 * 增加对于CAN1与CAN2的SCE中断和TX中断的公共处理函数 * formatting格式化代码 * update struct can_filter_item and rt_can_msg 1. 对过滤器号和索引号结构体定义中同一名称hdr进行重命名hdr_bank和hdr_index, 以便准确区分.采用宏定义兼容以前变量名. 2. 添加接收标识rxfifo,已指明是哪个RXFIFO. * 更正42M下的波特率 * 修复接收获取索引号错误 * 添加接收标识 * 更新注释 * 取消CANFD限制 * update struct can_filter_item and rt_can_msg
This commit is contained in:
@@ -169,7 +169,7 @@ static void can_rx_thread(void *parameter)
|
||||
while (1)
|
||||
{
|
||||
/* hdr 值为 - 1,表示直接从 uselist 链表读取数据 */
|
||||
rxmsg.hdr = -1;
|
||||
v .hdr = -1;
|
||||
/* 阻塞等待接收信号量 */
|
||||
rt_sem_take(&rx_sem, RT_WAITING_FOREVER);
|
||||
/* 从 CAN 读取一帧数据 */
|
||||
|
||||
@@ -226,13 +226,13 @@ static rt_err_t swm_can_control(struct rt_can_device *can_device, int cmd, void
|
||||
/* get default filter */
|
||||
for (int i = 0; i < filter_cfg->count; i++)
|
||||
{
|
||||
if (filter_cfg->items[i].hdr == -1)
|
||||
if (filter_cfg->items[i].hdr_bank == -1)
|
||||
{
|
||||
filter_idx = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
filter_idx = filter_cfg->items[i].hdr;
|
||||
filter_idx = filter_cfg->items[i].hdr_bank;
|
||||
}
|
||||
|
||||
if (filter_cfg->items[i].ide == RT_CAN_STDID)
|
||||
|
||||
Reference in New Issue
Block a user