#include <rtx_can.h>
CAN_ERROR CAN_receive (
U32 ctrl, /* CAN Controller */
CAN_msg *msg, /* CAN Message */
U16 timeout); /* Time to Wait */
Description
The CAN_receive function receives a message on the CAN
controller specified by ctrl and copies it into
msg.
The CAN_receive function does not clear hardware message
FIFOs. So, if a message was received prior to invoking
CAN_receive, that message is returned immediately. If the
message FIFO is empty, CAN_receive waits (up to the specified
timeout) for a message to be received.
timeout
Description
0
Return immediately.
0x0001-0xFFFE
Wait the specified number of RTX Kernel
ticks.
0xFFFF
Wait infinitely.
If a message is not received by the specified time, an error is
returned.
The CAN_receive function executes quickly since all data
transfers use software buffers. Only in situations where the FIFO is
empty is the CAN_receive function delayed.
The CAN_receive function is part of RL-CAN. The prototype
is defined in RTX_CAN.h.
Return Value
The CAN_receive function returns one of the following
manifest constants.
CAN_OK
Success.
CAN_DEALLOC_MEM_ERROR
Indicates that the memory used by the received message was not
correctly deallocated.
CAN_TIMEOUT
Indicates that the timeout expired before a message was
received.
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.