HardFOC Flux V1 HAL
Unified HAL API for the HardFOC Flux valve-control platform (ESP32-S3)
Loading...
Searching...
No Matches
Functions
flux::bsp::host Namespace Reference

Functions

void Reset () noexcept
 Destroy every object in every slot and clear all scripting (call between test cases).
 
hf::host::MockGpio * Gpio (size_t slot) noexcept
 The fake in GPIO slot slot, or nullptr when the slot is empty.
 
hf::host::MockGpio * GpioByPin (hf_pin_num_t pin) noexcept
 The fake driving MCU pin pin, or nullptr.
 
const GpioSpec * GpioSpecOf (size_t slot) noexcept
 The spec the slot was created with (valid only while the slot is in use).
 
void FailGpioInit (hf_pin_num_t pin) noexcept
 Make the next CreateGpio for pin produce a fake whose initialisation fails.
 
void SetSpiResponder (hf_pin_num_t cs, hf::host::MockSpi::Responder responder)
 Install a responder for the device whose chip select is cs (applied when it is created).
 
hf::host::MockSpi * SpiDeviceByCs (hf_pin_num_t cs) noexcept
 The fake for chip select cs, or nullptr when no such device exists.
 
const SpiDeviceSpec * SpiDeviceSpecOf (hf_pin_num_t cs) noexcept
 The spec the device on chip select cs was created with, or nullptr.
 
const SpiBusSpec * SpiBusSpecOf (size_t bus) noexcept
 The spec bus bus was created with, or nullptr when it is down.
 
void FailSpiBus (size_t bus, bool fail=true) noexcept
 Make CreateSpiBus(bus) fail.
 
hf::host::MockAdc * InternalAdc () noexcept
 The MCU ADC fake, or nullptr when not created.
 
uint32_t InternalAdcChannelMask () noexcept
 Channel mask the MCU ADC was created with.
 
void FailInternalAdc (bool fail=true) noexcept
 Make CreateInternalAdc fail.
 
hf::host::MockTemperature * DieTemperature () noexcept
 The die-temperature fake, or nullptr.
 
void FailDieTemperatureInit (bool fail=true) noexcept
 Make the next die-temperature fake fail its initialisation.
 
hf::host::MockNvs * Nvs (size_t slot) noexcept
 The NVS fake in region slot, or nullptr.
 
hf::host::MockCan * Can () noexcept
 The CAN fake, or nullptr.
 
hf::host::MockUart * Uart (uint8_t port) noexcept
 The UART fake on port, or nullptr.
 
void FailLedStrip (bool fail=true) noexcept
 Make LedStripBegin fail.
 
uint32_t LedShownPixel (uint16_t index) noexcept
 Last colour shown on LED index (after LedStripShow).
 
void SetResetReason (uint32_t reason) noexcept
 Value LastResetReason() returns.
 
int RestartCalls () noexcept
 Number of SystemRestart() calls (the host version throws after counting).
 

Function Documentation

◆ Can()

hf::host::MockCan * flux::bsp::host::Can ( )
noexcept

The CAN fake, or nullptr.

◆ DieTemperature()

hf::host::MockTemperature * flux::bsp::host::DieTemperature ( )
noexcept

The die-temperature fake, or nullptr.

◆ FailDieTemperatureInit()

void flux::bsp::host::FailDieTemperatureInit ( bool  fail = true)
noexcept

Make the next die-temperature fake fail its initialisation.

◆ FailGpioInit()

void flux::bsp::host::FailGpioInit ( hf_pin_num_t  pin)
noexcept

Make the next CreateGpio for pin produce a fake whose initialisation fails.

◆ FailInternalAdc()

void flux::bsp::host::FailInternalAdc ( bool  fail = true)
noexcept

Make CreateInternalAdc fail.

◆ FailLedStrip()

void flux::bsp::host::FailLedStrip ( bool  fail = true)
noexcept

Make LedStripBegin fail.

◆ FailSpiBus()

void flux::bsp::host::FailSpiBus ( size_t  bus,
bool  fail = true 
)
noexcept

Make CreateSpiBus(bus) fail.

◆ Gpio()

hf::host::MockGpio * flux::bsp::host::Gpio ( size_t  slot)
noexcept

The fake in GPIO slot slot, or nullptr when the slot is empty.

◆ GpioByPin()

hf::host::MockGpio * flux::bsp::host::GpioByPin ( hf_pin_num_t  pin)
noexcept

The fake driving MCU pin pin, or nullptr.

◆ GpioSpecOf()

const GpioSpec * flux::bsp::host::GpioSpecOf ( size_t  slot)
noexcept

The spec the slot was created with (valid only while the slot is in use).

◆ InternalAdc()

hf::host::MockAdc * flux::bsp::host::InternalAdc ( )
noexcept

The MCU ADC fake, or nullptr when not created.

◆ InternalAdcChannelMask()

uint32_t flux::bsp::host::InternalAdcChannelMask ( )
noexcept

Channel mask the MCU ADC was created with.

◆ LedShownPixel()

uint32_t flux::bsp::host::LedShownPixel ( uint16_t  index)
noexcept

Last colour shown on LED index (after LedStripShow).

◆ Nvs()

hf::host::MockNvs * flux::bsp::host::Nvs ( size_t  slot)
noexcept

The NVS fake in region slot, or nullptr.

◆ Reset()

void flux::bsp::host::Reset ( )
noexcept

Destroy every object in every slot and clear all scripting (call between test cases).

◆ RestartCalls()

int flux::bsp::host::RestartCalls ( )
noexcept

Number of SystemRestart() calls (the host version throws after counting).

◆ SetResetReason()

void flux::bsp::host::SetResetReason ( uint32_t  reason)
noexcept

Value LastResetReason() returns.

◆ SetSpiResponder()

void flux::bsp::host::SetSpiResponder ( hf_pin_num_t  cs,
hf::host::MockSpi::Responder  responder 
)

Install a responder for the device whose chip select is cs (applied when it is created).

Here is the call graph for this function:

◆ SpiBusSpecOf()

const SpiBusSpec * flux::bsp::host::SpiBusSpecOf ( size_t  bus)
noexcept

The spec bus bus was created with, or nullptr when it is down.

◆ SpiDeviceByCs()

hf::host::MockSpi * flux::bsp::host::SpiDeviceByCs ( hf_pin_num_t  cs)
noexcept

The fake for chip select cs, or nullptr when no such device exists.

Here is the caller graph for this function:

◆ SpiDeviceSpecOf()

const SpiDeviceSpec * flux::bsp::host::SpiDeviceSpecOf ( hf_pin_num_t  cs)
noexcept

The spec the device on chip select cs was created with, or nullptr.

◆ Uart()

hf::host::MockUart * flux::bsp::host::Uart ( uint8_t  port)
noexcept

The UART fake on port, or nullptr.