@CHIP-RTOS C Library V2.06 - CAN API
CAN_Rx_Filters
Initialize a receiver filter. int CAN_Rx_Filters ( unsigned int port_idx, unsigned int filter_idx,
const CAN_RX_FILT far *filt); Parameters
port_idx
- CAN port specifier:
CAN0_PORT = 0, or CAN1_PORT = 1
filter_idx
- Receiver filter specifier:
CAN_FILT1 = 0
CAN_FILT2 = 1
CAN_FILT3 = 2
filt
- Pointer to
filter
initialization data structure set by caller. This may be
set to NULL to disable the respective receiver filter so that
no CAN messages are accepted by the filter.
Return Value
- Error code -
CAN_EC_SUCCESS = 0: Success
CAN_EC_INVALID_PARAMS = -1: port_idx or
filter_idx invalid
Comments
- This function must be called
in order to receive any CAN
messages on respective port. If all three message filters are
disabled, no messages are received. This is the default condition
following a reset.
This function is used to initialize one of the CAN receiver's
three sets of acceptance filter registers. The receiver
acceptance filters may be used to limit the incoming message
traffic to those CAN messages which apply to this node in the network.
To receive all messages, one message filter must be enabled
and programmed with all its fields as "don't care" ('1's).
This function may be used either before or after the respective
CAN port has been opened.
Inside this API the interrupts are masked for a short period and then
re-enabled. This function is reentrant.
See Also
RTOS API
- This library function uses a
dynamic
link to reach the service
offered by RTOS software
interrupt.
Supported since or modified in @CHIP-RTOS version-
SC12 | SC13 | SC11 | SC1x3 |
-
n/a | n/a | n/a | V0.90 |
Supported by @CHIP-RTOS C Library since version
This API List
List of C Libraries
@CHIP-RTOS Main Index
End of document
|