|
HardFOC Flux V1 HAL
Unified HAL API for the HardFOC Flux valve-control platform (ESP32-S3)
|
Namespaces | |
| namespace | anonymous_namespace{FluxPlatformBindEsp32s3.cpp} |
| namespace | anonymous_namespace{FluxPlatformBindHost.cpp} |
| namespace | host |
Classes | |
| struct | CanSpec |
| The CAN controller and its pins. More... | |
| struct | GpioSpec |
| Electrical configuration of one MCU GPIO. More... | |
| struct | LedStripSpec |
| An addressable RGB LED strip on one data pin. More... | |
| struct | SpiBusSpec |
| One SPI controller and its pins. More... | |
| struct | SpiDeviceSpec |
| One chip select on an SPI bus. More... | |
| struct | UartSpec |
| One hardware UART, 8N1, no flow control. More... | |
Functions | |
| BaseGpio * | CreateGpio (size_t slot, const GpioSpec &spec) noexcept |
Create the GPIO object for slot. No hardware access until the object is initialised. | |
| void | DestroyGpio (size_t slot) noexcept |
Destroy the GPIO object in slot (releases the pin). | |
| uint8_t | InternalAdcChannelCount () noexcept |
| Number of channels per unit of the MCU ADC (0 when the family has none). | |
| BaseAdc * | CreateInternalAdc (uint8_t unit, uint32_t channel_mask) noexcept |
| Create and initialise the MCU ADC unit with the given channels enabled. | |
| void | DestroyInternalAdc () noexcept |
| Destroy the MCU ADC unit. | |
| BaseTemperature * | CreateDieTemperature () noexcept |
| Create the MCU die-temperature sensor (not initialised). nullptr if the family has none. | |
| void | DestroyDieTemperature () noexcept |
| Destroy the die-temperature sensor. | |
| BaseNvs & | NvsRegion (size_t slot, const char *name_space) noexcept |
The NVS region in slot, created on first call for name_space (no flash access). | |
| bool | CreateSpiBus (size_t bus, const SpiBusSpec &spec) noexcept |
Create and initialise SPI bus bus. | |
| BaseSpi * | CreateSpiDevice (size_t bus, const SpiDeviceSpec &spec) noexcept |
| Add a device to an initialised SPI bus. | |
| void | DestroySpiBus (size_t bus) noexcept |
Destroy SPI bus bus and every device on it. | |
| BaseCan * | CreateCan (const CanSpec &spec) noexcept |
| Create the CAN controller (configured, not started). nullptr on failure. | |
| void | DestroyCan () noexcept |
| Destroy the CAN controller. | |
| BaseUart * | CreateUart (const UartSpec &spec, bool *rs485) noexcept |
Create and initialise a UART. When spec.rts >= 0 the port is switched to RS-485 half duplex. | |
| void | DestroyUart (uint8_t port) noexcept |
Destroy the UART on port. | |
| BaseUsbSerialJtag * | AcquireUsbSerialJtag (const hf_usb_serial_jtag_config_t &cfg) noexcept |
The USB Serial/JTAG controller, initialised. nullptr when the family has none or the feature is compiled out (HF_CORE_ENABLE_USB_SERIAL_JTAG=OFF). First call wins cfg. | |
| bool | LedStripBegin (const LedStripSpec &spec) noexcept |
| Create and start the strip. | |
| void | LedStripSetPixel (uint16_t index, uint32_t rgb) noexcept |
Stage a 0xRRGGBB colour for LED index (sent on LedStripShow). | |
| void | LedStripSetBrightness (uint8_t brightness) noexcept |
| Global brightness 0..255 applied to the next LedStripShow. | |
| bool | LedStripShow () noexcept |
| Send the staged colours. | |
| void | LedStripEnd () noexcept |
| Stop the strip and release its peripheral. | |
| uint32_t | LastResetReason () noexcept |
| Opaque reset cause of the previous boot (family-specific numbering; 0 when unknown). | |
| void | SystemRestart () noexcept |
| Software reset of the MCU. Does not return. | |
| uint32_t | FreeHeapBytes () noexcept |
| Free bytes in the default heap (0 when unknown). | |
| uint32_t | LargestFreeHeapBlock () noexcept |
| Largest contiguous free block in the default heap (0 when unknown). | |
Variables | |
| constexpr size_t | kMaxGpioSlots = 64 |
| GPIO objects (one per functional pin index) | |
| constexpr size_t | kMaxSpiBuses = 2 |
| SPI controllers in use. | |
| constexpr size_t | kMaxSpiDevicesPerBus = 4 |
| Chip selects per SPI bus. | |
| constexpr size_t | kMaxUartPorts = 3 |
| Hardware UART ports. | |
| constexpr size_t | kMaxNvsRegions = 3 |
| NVS namespaces opened by NvsManager. | |
| constexpr uint8_t | kMaxInternalAdcChannels = 16 |
| Upper bound on MCU ADC channels per unit. | |
|
noexcept |
The USB Serial/JTAG controller, initialised. nullptr when the family has none or the feature is compiled out (HF_CORE_ENABLE_USB_SERIAL_JTAG=OFF). First call wins cfg.
|
noexcept |
Create the CAN controller (configured, not started). nullptr on failure.
|
noexcept |
Create the MCU die-temperature sensor (not initialised). nullptr if the family has none.
|
noexcept |
Create the GPIO object for slot. No hardware access until the object is initialised.
| slot | Index below kMaxGpioSlots (the functional pin index). |
| spec | Pin and electrical configuration. |
slot is out of range or already in use.
|
noexcept |
Create and initialise the MCU ADC unit with the given channels enabled.
| unit | ADC unit (0 = ADC1). |
| channel_mask | Bit n set = enable channel n (full-scale range, 12-bit). |
|
noexcept |
Create and initialise SPI bus bus.
|
noexcept |
Add a device to an initialised SPI bus.
|
noexcept |
Create and initialise a UART. When spec.rts >= 0 the port is switched to RS-485 half duplex.
| spec | Port and line configuration. | |
| [out] | rs485 | Set to true when RS-485 mode was requested and applied (may be nullptr). |
|
noexcept |
Destroy the CAN controller.
|
noexcept |
Destroy the die-temperature sensor.
|
noexcept |
Destroy the GPIO object in slot (releases the pin).
|
noexcept |
Destroy the MCU ADC unit.
|
noexcept |
Destroy SPI bus bus and every device on it.
|
noexcept |
Destroy the UART on port.
|
noexcept |
Free bytes in the default heap (0 when unknown).
|
noexcept |
Number of channels per unit of the MCU ADC (0 when the family has none).
|
noexcept |
Largest contiguous free block in the default heap (0 when unknown).
|
noexcept |
Opaque reset cause of the previous boot (family-specific numbering; 0 when unknown).
|
noexcept |
Create and start the strip.
|
noexcept |
Stop the strip and release its peripheral.
|
noexcept |
Global brightness 0..255 applied to the next LedStripShow.
|
noexcept |
Stage a 0xRRGGBB colour for LED index (sent on LedStripShow).
|
noexcept |
Send the staged colours.
|
noexcept |
The NVS region in slot, created on first call for name_space (no flash access).
| slot | Index below kMaxNvsRegions. |
| name_space | Namespace name (at most 15 characters); ignored after the first call. |
|
noexcept |
Software reset of the MCU. Does not return.
|
inlineconstexpr |
GPIO objects (one per functional pin index)
|
inlineconstexpr |
Upper bound on MCU ADC channels per unit.
|
inlineconstexpr |
NVS namespaces opened by NvsManager.
|
inlineconstexpr |
SPI controllers in use.
|
inlineconstexpr |
Chip selects per SPI bus.
|
inlineconstexpr |
Hardware UART ports.