|
| CAN_rx_object| Summary | |
#include <rtx_can.h>
CAN_ERROR CAN_rx_object (
U32 ctrl, /* CAN Controller */
U32 channel, /* CAN Channel Number */
U32 id, /* Message ID */
CAN_FORMAT format); /* ID Format (11/29-bit) */
| | 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 message ID format may be one of the following: - STANDARD_FORMAT
Standard 11-bit identifier. - EXTENDED_FORMAT
Extended 29-bit identifier.
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 Philips LPC2000 devices, do not use the channel information. For these devices, you should specify a value of 0 for the channel.
| | Return Value | | The CAN_rx_object function returns one of the following manifest constants. - CAN_OK
Success. - CAN_OBJECTS_FULL_ERROR
Indicates that no more transmit or receive objects may be defined.
| | See Also | | CAN_tx_object | | Example | |
#include <rtx_can.h>
void main (void)
{
CAN_rx_object (1, 0, 33, STANDARD_FORMAT);
// Enable reception of a message on controller 1,
// channel 0, with 11-bit ID 33
}
|
|
|