#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.
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.