Книга: Advanced PIC Microcontroller Projects in C
9.10.6 CANSetFilter
9.10.6 CANSetFilter
The CANSetFilter function sets filter values. The function prototype is:
void CANSetFilter(char CAN_FILTER, long value,
char CAN_CONFIG_FLAGS)
• CAN_FILTER can be one of the following:
• CAN_FILTER_B1_F1 Filter 1 for buffer 1
• CAN_FILTER_B1_F2 Filter 2 for buffer 1
• CAN_FILTER_B2_F1 Filter 1 for buffer 2
• CAN_FILTER_B2_F2 Filter 2 for buffer 2
• CAN_FILTER_B2_F3 Filter 3 for buffer 2
• CAN_FILTER_B2_F4 Filter 4 for buffer 2
CAN_CONFIG_FLAGS can be either CAN_CONFIG_XTD (extended message) or CAN_CONFIG_STD (standard message).