在标识符屏蔽模式下
CAN_FilterInitStructure.CAN_FilterIdHigh= (((((u32)0x01 <<21)&0xFFFF0000)>>16));
CAN_FilterInitStructure.CAN_FilterIdLow= ((((u32)0x01<<21)|CAN_ID_STD|CAN_RTR_DATA)&0xFFFF) ;
CAN_FilterInitStructure.CAN_FilterMaskIdHigh= 0xFFFF;
CAN_FilterInitStructure.CAN_FilterMaskIdLow= 0xFFFF;
上面是只接收0x01的标准帧ID,若我想接收0x01 , 0x02 2个ID,该如何配置? |