STM32Cube Expansion Pack CAN Stack
CAN driver

Driver classes to handle a specific CAN controller module. More...

Collaboration diagram for CAN driver:

Classes

class  Can
 This pure virtual class holds the interface to work with derived driver classes. More...
 
class  CanDrv_bxCAN
 driver class to work with the STM32 bxCAN controller module More...
 

Enumerations

enum  CanDrvStates { CanDrvStates::Uninit, CanDrvStates::Ready }
 CAN module state machine is very simple. More...
 
enum  CanControllerStates { CanControllerStates::CS_Uninit = 0x00, CanControllerStates::CS_Started = 0x01, CanControllerStates::CS_Stopped = 0x02, CanControllerStates::CS_Sleep = 0x03 }
 

Variables

const ComIfptr2ComIf
 

Detailed Description

Driver classes to handle a specific CAN controller module.

Enumeration Type Documentation

◆ CanControllerStates

enum CanControllerStates
strong

CAN Controller State Machine

Enumerator
CS_Uninit 

for hardware init we will be in

CS_Started 

This is the working state

CS_Stopped 

the CAN controller is ready to work, but does not participate on the bus

CS_Sleep 

the CAN controller is in sleep mode

Definition at line 235 of file Can.h.

◆ CanDrvStates

enum CanDrvStates
strong

CAN module state machine is very simple.

the controller holds there own state machine with CanControllerStates

Enumerator
Uninit 

the module is without configuration

Ready 

the configuration is loaded

Definition at line 226 of file Can.h.

Variable Documentation

◆ ptr2ComIf

const ComIf* ptr2ComIf

To hold the callback function pointers of the CanIf module

Todo:
we should bring this inside the CanDrv object, we need it outside because of use in ISR

To hold the callback function pointers of the CanIf module

Definition at line 18 of file Can.cpp.

Referenced by CanDrv_bxCAN::Init().