correct can hdr defines
This commit is contained in:
parent
67b6b30e88
commit
9cbf30a767
|
@ -60,8 +60,10 @@ struct rt_can_filter_item
|
||||||
rt_uint32_t mode :1;
|
rt_uint32_t mode :1;
|
||||||
rt_uint32_t mask;
|
rt_uint32_t mask;
|
||||||
rt_int32_t hdr;
|
rt_int32_t hdr;
|
||||||
|
#ifdef RT_CAN_USING_HDR
|
||||||
rt_err_t (*ind)(rt_device_t dev, void* args ,rt_int32_t hdr, rt_size_t size);
|
rt_err_t (*ind)(rt_device_t dev, void* args ,rt_int32_t hdr, rt_size_t size);
|
||||||
void* args;
|
void* args;
|
||||||
|
#endif /*RT_CAN_USING_HDR*/
|
||||||
};
|
};
|
||||||
#ifdef RT_CAN_USING_HDR
|
#ifdef RT_CAN_USING_HDR
|
||||||
#define RT_CAN_FILTER_ITEM_INIT(id,ide,rtr,mode,mask,ind,args) \
|
#define RT_CAN_FILTER_ITEM_INIT(id,ide,rtr,mode,mask,ind,args) \
|
||||||
|
@ -88,7 +90,7 @@ struct rt_can_filter_item
|
||||||
#define RT_CAN_EXT_RMT_DATA_FILTER_INIT(id,ind,args) \
|
#define RT_CAN_EXT_RMT_DATA_FILTER_INIT(id,ind,args) \
|
||||||
RT_CAN_FILTER_ITEM_INIT(id,1,0,1,0xFFFFFFFF,ind,args)
|
RT_CAN_FILTER_ITEM_INIT(id,1,0,1,0xFFFFFFFF,ind,args)
|
||||||
#else
|
#else
|
||||||
#define RT_CAN_FILTER_ITEM_INIT(id,ide,rtr,mode,mask,args) \
|
#define RT_CAN_FILTER_ITEM_INIT(id,ide,rtr,mode,mask) \
|
||||||
{\
|
{\
|
||||||
id,\
|
id,\
|
||||||
ide,\
|
ide,\
|
||||||
|
@ -96,20 +98,19 @@ struct rt_can_filter_item
|
||||||
mode,\
|
mode,\
|
||||||
mask,\
|
mask,\
|
||||||
-1,\
|
-1,\
|
||||||
args,\
|
|
||||||
}
|
}
|
||||||
#define RT_CAN_FILTER_STD_INIT(id,args) \
|
#define RT_CAN_FILTER_STD_INIT(id) \
|
||||||
RT_CAN_FILTER_ITEM_INIT(id,0,0,0,0xFFFFFFFF,args)
|
RT_CAN_FILTER_ITEM_INIT(id,0,0,0,0xFFFFFFFF)
|
||||||
#define RT_CAN_FILTER_EXT_INIT(id,args) \
|
#define RT_CAN_FILTER_EXT_INIT(id) \
|
||||||
RT_CAN_FILTER_ITEM_INIT(id,1,0,0,0xFFFFFFFF,args)
|
RT_CAN_FILTER_ITEM_INIT(id,1,0,0,0xFFFFFFFF)
|
||||||
#define RT_CAN_STD_RMT_FILTER_INIT(id,args) \
|
#define RT_CAN_STD_RMT_FILTER_INIT(id) \
|
||||||
RT_CAN_FILTER_ITEM_INIT(id,0,1,0,0xFFFFFFFF,args)
|
RT_CAN_FILTER_ITEM_INIT(id,0,1,0,0xFFFFFFFF)
|
||||||
#define RT_CAN_EXT_RMT_FILTER_INIT(id,args) \
|
#define RT_CAN_EXT_RMT_FILTER_INIT(id) \
|
||||||
RT_CAN_FILTER_ITEM_INIT(id,1,1,0,0xFFFFFFFF,args)
|
RT_CAN_FILTER_ITEM_INIT(id,1,1,0,0xFFFFFFFF)
|
||||||
#define RT_CAN_STD_RMT_DATA_FILTER_INIT(id,args) \
|
#define RT_CAN_STD_RMT_DATA_FILTER_INIT(id) \
|
||||||
RT_CAN_FILTER_ITEM_INIT(id,0,0,1,0xFFFFFFFF,args)
|
RT_CAN_FILTER_ITEM_INIT(id,0,0,1,0xFFFFFFFF)
|
||||||
#define RT_CAN_EXT_RMT_DATA_FILTER_INIT(id,args) \
|
#define RT_CAN_EXT_RMT_DATA_FILTER_INIT(id) \
|
||||||
RT_CAN_FILTER_ITEM_INIT(id,1,0,1,0xFFFFFFFF,args)
|
RT_CAN_FILTER_ITEM_INIT(id,1,0,1,0xFFFFFFFF)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
struct rt_can_filter_config
|
struct rt_can_filter_config
|
||||||
|
|
Loading…
Reference in New Issue