#include <rtx_can.h>
CAN_ERROR CAN_send (
U32 ctrl, /* CAN Controller */
CAN_msg *msg, /* CAN Message */
U16 timeout); /* Time to Wait */
Description
The CAN_send function transmits msg
using the CAN controller specified by ctrl.
If the CAN controller hardware is ready (no other transmissions
are in progress), the CAN_send function sends the msg to the CAN controller for transmission. If the CAN
controller is busy, the 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 message is not stored in the FIFO by the specified time, an
error is returned.
The CAN_send function executes quickly since all data
transfers use software buffers. Only in situations where the FIFO is
full is the CAN_send function delayed.
The CAN_send function is part of RL-CAN. The prototype is
defined in RTX_CAN.h.
Return Value
The CAN_send 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 transmitted message was not
correctly deallocated.
CAN_TIMEOUT
Indicates that the timeout expired before a message was
transmitted.
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.