Home / RL-ARM User's Guide (MDK v4)
CAN_ERROR
The CAN_ERROR type is defined in can_error.h. It
defines the error return values for the CAN driver routines. The
CAN_ERROR type is defined as:
typedef enum {
CAN_OK = 0, /* No error */
CAN_NOT_IMPLEMENTED_ERROR, /* Function has not been implemented */
CAN_MEM_POOL_INIT_ERROR, /* Memory pool initialization error */
CAN_BAUDRATE_ERROR, /* Baudrate was not set */
CAN_TX_BUSY_ERROR, /* Transmitting hardware busy */
CAN_OBJECTS_FULL_ERROR, /* No more rx or tx objects available */
CAN_ALLOC_MEM_ERROR, /* Unable to allocate memory from pool */
CAN_DEALLOC_MEM_ERROR, /* Unable to deallocate memory */
CAN_TIMEOUT_ERROR, /* Timeout expired */
CAN_UNEXIST_CTRL_ERROR, /* Controller does not exist */
CAN_UNEXIST_CH_ERROR, /* Channel does not exist */
} CAN_ERROR;
and is used as shown in the following example:
#include <can_error.h>
..
CAN_ERROR retval;
..
retval = CAN_send (2, &msg_buf, 0x0F00);
..