ChibiOS/RT Logo ChibiOS/RT

Architecture - Reference Manual - Guides

CANDriver Struct Reference
[CAN Low Level DriverSTM32 CAN Support]

Structure representing an CAN driver. More...

#include <can_lld.h>

Collaboration diagram for CANDriver:
Collaboration graph
[legend]

Data Fields

canstate_t cd_state
 Driver state.
const CANConfigcd_config
 Current configuration data.
Semaphore cd_txsem
 Transmission queue semaphore.
Semaphore cd_rxsem
 Receive queue semaphore.
EventSource cd_rxfull_event
 One or more frames become available.
EventSource cd_txempty_event
 One or more transmission slots become available.
EventSource cd_error_event
 A CAN bus error happened.
canstatus_t cd_status
 Error flags set when an error event is broadcasted.
EventSource cd_sleep_event
 Entering sleep state event.
EventSource cd_wakeup_event
 Exiting sleep state event.
CAN_TypeDef * cd_can
 Pointer to the CAN registers.

Detailed Description

Structure representing an CAN driver.

Definition at line 155 of file templates/can_lld.h.


Field Documentation

Driver state.

Definition at line 159 of file templates/can_lld.h.

Referenced by canObjectInit(), canReceive(), canSleep(), canStart(), canStop(), canTransmit(), and canWakeup().

Current configuration data.

Definition at line 163 of file templates/can_lld.h.

Referenced by canObjectInit(), and canStart().

Transmission queue semaphore.

Definition at line 167 of file templates/can_lld.h.

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

Receive queue semaphore.

Definition at line 171 of file templates/can_lld.h.

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

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.

Definition at line 181 of file templates/can_lld.h.

Referenced by canObjectInit().

One or more transmission slots become available.

Definition at line 185 of file templates/can_lld.h.

Referenced by canObjectInit().

A CAN bus error happened.

Definition at line 189 of file templates/can_lld.h.

Referenced by canObjectInit().

Error flags set when an error event is broadcasted.

Definition at line 193 of file templates/can_lld.h.

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

Entering sleep state event.

Definition at line 198 of file templates/can_lld.h.

Referenced by canObjectInit(), and canSleep().

Exiting sleep state event.

Definition at line 202 of file templates/can_lld.h.

Referenced by canObjectInit(), and canWakeup().

CAN_TypeDef* CANDriver::cd_can

Pointer to the CAN registers.

Definition at line 290 of file platforms/STM32/can_lld.h.

Referenced by can_lld_sleep(), and can_lld_wakeup().


Generated on Sun Jul 11 13:13:32 2010 for ChibiOS/RT by doxygen 1.6.3