本帖最后由 yzzly 于 2011-6-2 14:34 编辑
过滤器初始化结构:
typedef struct
{
u8 CAN_FilterNumber;
u8 CAN_FilterMode;
u8 CAN_FilterScale;
u16 CAN_FilterIdHigh;
u16 CAN_FilterIdLow;
u16 CAN_FilterMaskIdHigh;
u16 CAN_FilterMaskIdLow;
u16 CAN_FilterFIFOAssignment;
FunctionalState CAN_FilterActivation;
} CAN_FilterInitTypeDef;
中有
u16 CAN_FilterIdHigh;
u16 CAN_FilterIdLow;
u16 CAN_FilterMaskIdHigh;
u16 CAN_FilterMaskIdLow;
四项内容,但是在过滤器初始化函数内并没有看到这四项被使用,那么这四项定义是什么意思?在过滤器初始化时究竟要付给哪几个寄存器?对接收过滤器的设置不胜明白,请指点,谢谢!
例如,如果本人想只接收标识符为0xEB90EB90的报文,怎么对发送标识符寄存器和接收过滤器设置? |