16 (22)
13.1.8
simply_can_status
Gets the status of the CAN controller.
bool simply_can_status(can_sts_t *can_sts);
Parameter
Parameter
Dir.
Description
can_sts
[out] Status as bit coded 16 bit value (see CAN status structure)
CAN Status Structure
typedef struct _can_sts {
uint16_t sts;
// bit coded status flags (see CAN status definitions)
uint16_t tx_free;
// number of free elements in CAN message tx fifo
} can_sts_t;
CAN Status Definitions
/* CAN status definitions */
#define CAN_STATUS_RUNNING
(0x01)
#define CAN_STATUS_RESET
(0x02)
#define CAN_STATUS_BUSOFF
(0x04)
#define CAN_STATUS_ERRORSTATUS
(0x08)
#define CAN_STATUS_RXOVERRUN
(0x10)
#define CAN_STATUS_TXOVERRUN
(0x20)
#define CAN_STATUS_PENDING
(0x40)
Return Value
Return value
Description
true
Function succeeded
false
Error occurred, call
simply_get_last_error
for more information.
simplyCAN User Manual
4.01.0001.22001 1.0 en-US