Skip to content

File STM32Board.cpp

FileList > Firmware > Libraries > STM32Board > STM32Board.cpp

Go to the source code of this file

  • #include "STM32Board.h"
  • #include <CANProtocol.h>

Namespaces

Type Name
namespace STM32Board

Public Types

Type Name
enum LedState

Public Static Attributes

Type Name
constexpr uint32_t LINK_DECAY_MS = 500
CONNECTED → NORMAL after this idle gap.
bool _begun = false
false → OFF (pre-begin)
bool _blinkPhase = false
CanStatus _canStatus = CanStatus::STARTING
Last value from onCanStatus()
bool _debugOn = false
CAN_HandleTypeDef _hcan
uint32_t _ledLastMs = 0
bool _linkActive = false
Data flowing (set by setLinkActive)
uint32_t _linkLastMs = 0
millis() of last setLinkActive(true)
LedState _state = LedState::OFF
bool _warning = false
App-layer warning latch.

Public Functions

Type Name
void HAL_CAN_MspInit (CAN_HandleTypeDef * hcan_p)

Public Static Functions

Type Name
void _applyLed ()
uint16_t _blinkPeriodFor (LedState s)
HardwareSerial _diag (PA10, PA9)
void _recompute ()

Public Types Documentation

enum LedState

enum LedState {
    OFF,
    BOOTING,
    NORMAL,
    CONNECTED,
    CAN_ERROR,
    BUS_OFF,
    WARNING
};

Public Static Attributes Documentation

CONNECTED → NORMAL after this idle gap.

constexpr uint32_t LINK_DECAY_MS;

variable _begun

false → OFF (pre-begin)

bool _begun;

variable _blinkPhase

bool _blinkPhase;

variable _canStatus

Last value from onCanStatus()

CanStatus _canStatus;

variable _debugOn

bool _debugOn;

variable _hcan

CAN_HandleTypeDef _hcan;

variable _ledLastMs

uint32_t _ledLastMs;

variable _linkActive

Data flowing (set by setLinkActive)

bool _linkActive;

variable _linkLastMs

millis() of last setLinkActive(true)

uint32_t _linkLastMs;

variable _state

LedState _state;

variable _warning

App-layer warning latch.

bool _warning;

Public Functions Documentation

function HAL_CAN_MspInit

void HAL_CAN_MspInit (
    CAN_HandleTypeDef * hcan_p
) 

Public Static Functions Documentation

function _applyLed

static void _applyLed () 

function _blinkPeriodFor

static uint16_t _blinkPeriodFor (
    LedState s
) 

function _diag

static HardwareSerial _diag (
    PA10,
    PA9
) 

function _recompute

static void _recompute () 


The documentation for this class was generated from the following file Firmware/Libraries/STM32Board/STM32Board.cpp