mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-09-24 05:04:10 +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:
@@ -368,13 +368,13 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)
|
||||
/* 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)
|
||||
{
|
||||
can_instance->config.filter_init_struct.filter_number = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
can_instance->config.filter_init_struct.filter_number = filter_cfg->items[i].hdr;
|
||||
can_instance->config.filter_init_struct.filter_number = filter_cfg->items[i].hdr_bank;
|
||||
}
|
||||
/**
|
||||
* ID | CAN_FxR1[31:24] | CAN_FxR1[23:16] | CAN_FxR1[15:8] | CAN_FxR1[7:0] |
|
||||
@@ -597,7 +597,7 @@ static int _can_recvmsg(struct rt_can_device *can, void *buf, rt_uint32_t fifo)
|
||||
pmsg->ide = rx_message.extended_id;
|
||||
|
||||
pmsg->rtr = rx_message.frame_type;
|
||||
pmsg->hdr = rx_message.filter_index;
|
||||
pmsg->hdr_index = rx_message.filter_index;
|
||||
|
||||
return RT_EOK;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user