|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
Namespaces | |
| namespace | anonymous_namespace{VortexBoardBindEsp32c6.cpp} |
| namespace | anonymous_namespace{VortexBoardBindHost.cpp} |
| namespace | esp32c6 |
| namespace | host |
Classes | |
| struct | CanSpec |
| Classic CAN controller. More... | |
| struct | I2cBusSpec |
| I2C master bus. More... | |
| struct | I2cDeviceSpec |
| One 7-bit device on the I2C bus. More... | |
| struct | SpiBusSpec |
| SPI master bus (one per board on Vortex: SPI2). More... | |
| struct | SpiDeviceSpec |
| One chip select on the SPI bus. More... | |
| struct | UartSpec |
| UART port, framing 8N1, no flow control. More... | |
Enumerations | |
| enum class | NvsRegion : uint8_t { App = 0 , Calibration , Config , Count } |
| The persistent-storage regions of the board. More... | |
Functions | |
| BaseUart * | UartOpen (const UartSpec &spec) noexcept |
| Open the board UART. | |
| void | UartClose () noexcept |
| Close the UART opened by UartOpen() (idempotent). | |
| bool | SpiOpen (const SpiBusSpec &spec) noexcept |
| Initialise the SPI bus. | |
| int | SpiAddDevice (const SpiDeviceSpec &spec) noexcept |
| Add a chip select. | |
| BaseSpi * | SpiDevice (int index) noexcept |
The device at index, or nullptr. | |
| void | SpiClose () noexcept |
| Remove every device and release the bus (idempotent). | |
| bool | I2cOpen (const I2cBusSpec &spec) noexcept |
| Initialise the I2C bus. | |
| int | I2cAddDevice (const I2cDeviceSpec &spec) noexcept |
| Add a device. | |
| BaseI2c * | I2cDevice (int index) noexcept |
The device at index, or nullptr. | |
| bool | I2cRemoveDevice (int index) noexcept |
| Remove one device. | |
| bool | I2cProbe (uint8_t address, uint32_t timeout_ms) noexcept |
| Address-only probe. | |
| size_t | I2cScan (uint8_t *out, size_t max, uint8_t first, uint8_t last, uint32_t timeout_ms) noexcept |
| Probe every address in [first, last]. | |
| bool | I2cReset () noexcept |
| Recover a stuck bus (clock pulses + re-init). | |
| void | I2cClose () noexcept |
| Remove every device and release the bus (idempotent). | |
| BaseCan * | CanOpen (const CanSpec &spec) noexcept |
| Open the CAN controller. | |
| void | CanClose () noexcept |
| Close the CAN controller (idempotent). | |
| BaseGpio * | McuGpioOpen (HfFunctionalGpioPin pin, hf_gpio_direction_t direction, hf_gpio_active_state_t active, hf_gpio_output_mode_t output_mode, hf_gpio_pull_mode_t pull) noexcept |
| Create the MCU GPIO for a functional pin (one slot per pin; a second call returns the same object). | |
| void | McuGpioCloseAll () noexcept |
| Destroy every MCU GPIO created by McuGpioOpen(). Pointers handed out become invalid. | |
| BaseNvs & | Nvs (NvsRegion region) noexcept |
| The NVS object of a region. Constructing it touches no hardware; call EnsureInitialized() on it. | |
| BaseTemperature * | McuTemperature () noexcept |
| The MCU's on-chip temperature sensor (not yet initialised), or nullptr if the MCU has none. | |
| uint64_t | MonotonicMicros () noexcept |
| Monotonic microseconds since boot, at the MCU's high-resolution timer (not the RTOS tick). | |
| bool | StatusLedOpen (int data_pin, uint32_t led_count) noexcept |
Open the addressable status LED chain on data_pin. | |
| bool | StatusLedShow (const uint32_t *rgb, uint32_t count, uint8_t brightness) noexcept |
| Latch colours onto the chain. | |
| void | StatusLedClose () noexcept |
| Turn the chain off and release it (idempotent). | |
| constexpr const char * | NvsNamespace (NvsRegion region) noexcept |
| Namespace name of a region. | |
|
strong |
|
noexcept |
Close the CAN controller (idempotent).
|
noexcept |
Open the CAN controller.
|
noexcept |
Add a device.
|
noexcept |
Remove every device and release the bus (idempotent).
|
noexcept |
The device at index, or nullptr.
|
noexcept |
Initialise the I2C bus.
|
noexcept |
Address-only probe.
address.
|
noexcept |
Remove one device.
|
noexcept |
Recover a stuck bus (clock pulses + re-init).
|
noexcept |
Probe every address in [first, last].
| out | Receives the 7-bit addresses that acknowledged. |
| max | Capacity of out. |
|
noexcept |
Destroy every MCU GPIO created by McuGpioOpen(). Pointers handed out become invalid.
|
noexcept |
Create the MCU GPIO for a functional pin (one slot per pin; a second call returns the same object).
|
noexcept |
The MCU's on-chip temperature sensor (not yet initialised), or nullptr if the MCU has none.
|
noexcept |
Monotonic microseconds since boot, at the MCU's high-resolution timer (not the RTOS tick).
Used to time TMCL batches; the RTOS tick (10 ms at CONFIG_FREERTOS_HZ=100) is far too coarse. Callable from any task.
|
noexcept |
The NVS object of a region. Constructing it touches no hardware; call EnsureInitialized() on it.
|
constexprnoexcept |
Namespace name of a region.
|
noexcept |
Add a chip select.
|
noexcept |
Remove every device and release the bus (idempotent).
|
noexcept |
The device at index, or nullptr.
|
noexcept |
Initialise the SPI bus.
|
noexcept |
Turn the chain off and release it (idempotent).
|
noexcept |
Open the addressable status LED chain on data_pin.
|
noexcept |
Latch colours onto the chain.
| rgb | One 0xRRGGBB value per LED. |
| count | Number of entries in rgb (at most the count given to StatusLedOpen()). |
| brightness | Global brightness 0..255 applied by the LED driver. |
|
noexcept |
|
noexcept |
Open the board UART.