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. |