CAN device driver interface

Definitions for low-level CAN driver interface. More...

Detailed Description

Definitions for low-level CAN driver interface.

This is the CAN controller generic driver interface

Files

file  candev.h
 Definitions for low-level CAN driver interface.
 

Data Structures

struct  candev
 Structure to hold driver state. More...
 
struct  candev_driver
 Structure to hold driver interface -> function mapping. More...
 

Typedefs

typedef struct candev candev_t
 Forward declaration for candev struct.
 
typedef void(* candev_event_cb_t) (candev_t *dev, candev_event_t event, void *arg)
 Event callback for signaling event to upper layers. More...
 
typedef struct candev_driver candev_driver_t
 Structure to hold driver interface -> function mapping.
 

Enumerations

enum  candev_event_t {
  CANDEV_EVENT_NOEVENT, CANDEV_EVENT_ISR, CANDEV_EVENT_WAKE_UP, CANDEV_EVENT_TX_CONFIRMATION,
  CANDEV_EVENT_TIMEOUT_TX_CONF, CANDEV_EVENT_RX_INDICATION, CANDEV_EVENT_TX_ERROR, CANDEV_EVENT_RX_ERROR,
  CANDEV_EVENT_BUS_OFF, CANDEV_EVENT_ERROR_PASSIVE, CANDEV_EVENT_ERROR_WARNING
}
 Possible event types that are sent from the device driver to the upper layer. More...
 

Typedef Documentation

◆ candev_event_cb_t

typedef void(* candev_event_cb_t) (candev_t *dev, candev_event_t event, void *arg)

Event callback for signaling event to upper layers.

Parameters
[in]devCAN device descriptor
[in]typetype of the event
[in]argevent argument

Definition at line 70 of file candev.h.

Enumeration Type Documentation

◆ candev_event_t

Possible event types that are sent from the device driver to the upper layer.

Enumerator
CANDEV_EVENT_NOEVENT 

no event, used internally

CANDEV_EVENT_ISR 

driver needs its ISR handled

CANDEV_EVENT_WAKE_UP 

driver has been woken up by bus

CANDEV_EVENT_TX_CONFIRMATION 

a packet has been sent

CANDEV_EVENT_TIMEOUT_TX_CONF 

tx conf timeout received

CANDEV_EVENT_RX_INDICATION 

a packet has been received

CANDEV_EVENT_TX_ERROR 

there was an error when transmitting

CANDEV_EVENT_RX_ERROR 

there was an error when receiving

CANDEV_EVENT_BUS_OFF 

bus-off detected

CANDEV_EVENT_ERROR_PASSIVE 

driver switched in error passive

CANDEV_EVENT_ERROR_WARNING 

driver reached error warning

Definition at line 43 of file candev.h.