| Summary |
#include <rtx_can.h>
CAN_ERROR CAN_rx_object (
U32 ctrl, /* CAN Controller */
U32 channel, /* CAN Channel Number */
U32 id, /* Message ID */
U32 object_para); /* Object Parameters */
|
| Description | The CAN_rx_object function enables message reception for the CAN controller specified by ctrl on the specified channel. Once enabled, the CAN controller will receive messages matching the specified id. The object_para may be one of the following: - DATA_TYPE
DATA FRAME message type. - REMOTE_TYPE
REMOTE FRAME message type. - STANDARD_TYPE
Message with standard 11-bit identifier type. - EXTENDED_TYPE
Message with extended 29-bit identifier type.
Note Types DATA_TYPE or REMOTE_TYPE can be used together with STANDARD_TYPE or EXTENDED_TYPE (type specifiers can be bit-ored together). The CAN_rx_object function is part of RL-CAN. The prototype is defined in RTX_CAN.h. Note - Some CAN controllers, like that used in the NXP LPC2000 devices, do not use the channel information. For these devices, you should specify a value of 0 for the channel.
|
| Example |
#include <rtx_can.h>
void main (void) {
CAN_rx_object (1, 0, 33, DATA_TYPE | STANDARD_TYPE);
// Enable reception of a DATA message on controller 1,
// channel 0, with STANDARD 11-bit ID 33
}
|