#include <rtx_can.h>
CAN_ERROR CAN_request (
U32 ctrl, /* CAN Controller */
CAN_msg *msg, /* CAN Message to Request */
U16 timeout); /* Time to Wait */
Description
The CAN_request function sends a REMOTE FRAME request (a
special CAN message that requests transmission of a specific
msg) via the CAN controller hardware specified by
ctrl.
If the CAN controller hardware is ready (no other transmissions
are in progress), the CAN_request function sends the REMOTE
FRAME request immediately. If the CAN controller is busy, the request
msg is put into a FIFO (that is managed using an
RTX mailbox). Messages stored in the the FIFO are sent in order.
The timeout specifies how long to wait for the
FIFO (mailbox slot) to become available.
timeout
Description
0
Return immediately.
0x0001-0xFFFE
Wait the specified number of RTX Kernel
ticks.
0xFFFF
Wait infinitely.
If a request is not stored in the FIFO by the specified time, an
error is returned.
The CAN_request function executes quickly since all data
transfers use software buffers. Only in situations where the FIFO is
full is the CAN_request function delayed.
The CAN_request function is part of RL-CAN. The prototype
is defined in RTX_CAN.h.
Return Value
The CAN_request function returns one of the following
manifest constants.
CAN_OK
Success.
CAN_ALLOC_MEM_ERROR
Indicates there is no available memory in the CAN memory pool.
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.