|
This routine sets the hardware acceptance filters in the CAN controller.
Value | Meaning |
---|---|
canFILTER_SET_CODE_STD | Sets the code for standard (11-bit) identifiers. |
canFILTER_SET_MASK_STD | Sets the mask for standard (11-bit) identifiers. |
canFILTER_SET_CODE_EXT | Sets the code for extended (29-bit) identifiers. |
canFILTER_SET_MASK_EXT | Sets the mask for extended (29-bit) identifiers. |
canOK (zero) if success
canERR_xxx (negative) if failure.
A binary 1 in a mask means "the corresponding bit in the code is relevant"
A binary 0 in a mask means "the corresponding bit in the code is not relevant"
A relevant binary 1 in a code means "the corresponding bit in the identifier must be 1"
A relevant binary 0 in a code means "the corresponding bit in the identifier must be 0"
In other words, the message is accepted if ((code XOR id) AND mask) == 0.