ChibiOS/HAL  6.1.0
CANDriver Struct Reference

Structure representing an CAN driver. More...

#include <hal_can_lld.h>

Collaboration diagram for CANDriver:
Collaboration graph

Data Fields

canstate_t state
 Driver state. More...
 
const CANConfigconfig
 Current configuration data. More...
 
threads_queue_t txqueue
 Transmission threads queue. More...
 
threads_queue_t rxqueue
 Receive threads queue. More...
 
event_source_t rxfull_event
 One or more frames become available. More...
 
event_source_t txempty_event
 One or more transmission mailbox become available. More...
 
event_source_t error_event
 A CAN bus error happened. More...
 
event_source_t sleep_event
 Entering sleep state event. More...
 
event_source_t wakeup_event
 Exiting sleep state event. More...
 

Detailed Description

Structure representing an CAN driver.

Definition at line 150 of file hal_can_lld.h.

Field Documentation

const CANConfig* CANDriver::config

Current configuration data.

Definition at line 158 of file hal_can_lld.h.

Referenced by canObjectInit(), canStart(), and canStop().

threads_queue_t CANDriver::txqueue

Transmission threads queue.

Definition at line 162 of file hal_can_lld.h.

Referenced by canObjectInit(), canStop(), and canTransmitTimeout().

threads_queue_t CANDriver::rxqueue

Receive threads queue.

Definition at line 166 of file hal_can_lld.h.

Referenced by canObjectInit(), canReceiveTimeout(), and canStop().

event_source_t CANDriver::rxfull_event

One or more frames become available.

Note
After broadcasting this event it will not be broadcasted again until the received frames queue has been completely emptied. It is not broadcasted for each received frame. It is responsibility of the application to empty the queue by repeatedly invoking chReceive() when listening to this event. This behavior minimizes the interrupt served by the system because CAN traffic.
The flags associated to the listeners will indicate which receive mailboxes become non-empty.

Definition at line 180 of file hal_can_lld.h.

Referenced by canObjectInit().

event_source_t CANDriver::txempty_event

One or more transmission mailbox become available.

Note
The flags associated to the listeners will indicate which transmit mailboxes become empty.

Definition at line 186 of file hal_can_lld.h.

Referenced by canObjectInit().

event_source_t CANDriver::error_event

A CAN bus error happened.

Note
The flags associated to the listeners will indicate the error(s) that have occurred.

Definition at line 192 of file hal_can_lld.h.

Referenced by canObjectInit().

event_source_t CANDriver::sleep_event

Entering sleep state event.

Definition at line 197 of file hal_can_lld.h.

Referenced by canObjectInit(), and canSleep().

event_source_t CANDriver::wakeup_event

Exiting sleep state event.

Definition at line 201 of file hal_can_lld.h.

Referenced by canObjectInit(), and canWakeup().