CAN_FilterInitStructure.CAN_FilterNumber = 1;
CAN_FilterInitStructure.CAN_FilterMode = CAN_FilterMode_IdMask;
CAN_FilterInitStructure.CAN_FilterScale = CAN_FilterScale_16bit;
CAN_FilterInitStructure.CAN_FilterIdHigh = (((u32)0x07AF<<21)&0xffff0000)>>16;
CAN_FilterInitStructure.CAN_FilterIdLow =(((u32)0x07A0<<21)&0xffff0000)>>16;
CAN_FilterInitStructure.CAN_FilterMaskIdHigh = 0xFFFF;
CAN_FilterInitStructure.CAN_FilterMaskIdLow = 0xFFA0;
CAN_FilterInitStructure.CAN_FilterFIFOAssignment = CAN_FIFO0;
CAN_FilterInitStructure.CAN_FilterActivation = ENABLE;
CAN_FilterInit( &CAN_FilterInitStructure );
我想过滤的ID为 07A0~07AF这一组数据,但是FilterIdHigh、FilterIdLow、FilterMaskIdHigh、FilterMaskIdLow这4个值,应该怎样设置~~~~!!!! 谢谢各位前辈、大神~!! |