#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.
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.
#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
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.