GD32 CAN hdr_bank set in filter initialization

This commit is contained in:
Dmitriy 2025-05-08 13:23:12 +03:00 committed by Rbb666
parent e6c55e384f
commit 61da09fab5
1 changed files with 6 additions and 0 deletions

View File

@ -391,11 +391,17 @@ static rt_err_t _can_control(struct rt_can_device *can, int cmd, void *arg)
{
/* can0 banks 0~13 */
can_dev->filter_config.filter_number = i;
#ifdef RT_CAN_USING_HDR
filter_cfg->items[i].hdr_bank = i;
#endif
}
else if (rt_strcmp(can_dev->name, "can1") == 0)
{
/* can1 banks 14~27 */
can_dev->filter_config.filter_number = i + 14;
#ifdef RT_CAN_USING_HDR
filter_cfg->items[i].hdr_bank = i + 14;
#endif
}
}
else