因为部分原因,can口只想接受0x0300xxxx为id的can数据,但是can过滤表一直没搞懂。
我需要的是 扩展帧,数据帧,我是如下设置的
struct rt_can_filter_item items[1] =
{
RT_CAN_FILTER_ITEM_INIT(0x03000000, 1, 0, 1, (0x03000000 << 16), 0, RT_NULL), /* id,扩展帧,数据帧,掩码模式,match ID:0x0300xxxx,hdr 为 - 1 */
};
struct rt_can_filter_config cfg = {1, 1, items};
掩码的计算这部分整个人都是懵的,求助