struct candev_driver candev_driver_t
Structure to hold driver interface -> function mapping.
void(* candev_event_cb_t)(candev_t *dev, candev_event_t event, void *arg)
Event callback for signaling event to upper layers.
candev_event_t
Possible event types that are sent from the device driver to the upper layer.
@ CANDEV_EVENT_RX_ERROR
there was an error when receiving
@ CANDEV_EVENT_TX_CONFIRMATION
a packet has been sent
@ CANDEV_EVENT_ISR
driver needs its ISR handled
@ CANDEV_EVENT_TX_ERROR
there was an error when transmitting
@ CANDEV_EVENT_WAKE_UP
driver has been woken up by bus
@ CANDEV_EVENT_NOEVENT
no event, used internally
@ CANDEV_EVENT_RX_INDICATION
a packet has been received
@ CANDEV_EVENT_TIMEOUT_TX_CONF
tx conf timeout received
@ CANDEV_EVENT_BUS_OFF
bus-off detected
@ CANDEV_EVENT_ERROR_PASSIVE
driver switched in error passive
@ CANDEV_EVENT_ERROR_WARNING
driver reached error warning
can_state
CAN operational and error states.
Mutex for thread synchronization.
CAN bit-timing parameters.
Controller Area Network filter.
Controller Area Network frame.
Structure to hold driver interface -> function mapping.
int(* set_filter)(candev_t *dev, const struct can_filter *filter)
Set a receive filter.
int(* get)(candev_t *dev, canopt_t opt, void *value, size_t max_len)
Get an option value from a given CAN device.
int(* send)(candev_t *dev, const struct can_frame *frame)
Send packet.
int(* set)(candev_t *dev, canopt_t opt, void *value, size_t value_len)
Set an option value for a given CAN device.
int(* init)(candev_t *dev)
the driver's initialization function
void(* isr)(candev_t *dev)
a driver's user-space ISR handler
int(* remove_filter)(candev_t *dev, const struct can_filter *filter)
Remove a filter.
int(* abort)(candev_t *dev, const struct can_frame *frame)
Abort a packet sending.
Structure to hold driver state.
const struct candev_driver * driver
ptr to that driver's interface.
candev_event_cb_t event_callback
callback for device events
enum can_state state
device state
struct can_bittiming bittiming
device bittimings
void * isr_arg
argument to pass on isr event
Definitions high-level CAN interface.
Definitions of high-level CAN interface.