|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
Host implementation of the Vortex board binding, over the hf-core host mocks. More...
Go to the source code of this file.
Classes | |
| struct | vortex::bsp::host::OpenLog |
| Every Open() call the managers made, and what the binding was asked to configure. More... | |
| struct | vortex::bsp::host::LedFrame |
| One frame latched onto the status LED. More... | |
| struct | vortex::bsp::host::Failures |
| Which Open() calls fail (the binding returns failure without creating the object). More... | |
Namespaces | |
| namespace | vortex |
| namespace | vortex::bsp |
| namespace | vortex::bsp::host |
Functions | |
| void | vortex::bsp::host::Reset () noexcept |
| Close every object, forget the log and the failures, and remove every simulated I2C chip. | |
| Failures & | vortex::bsp::host::Fail () noexcept |
| Failure injection for the next Open() calls (cleared by Reset()). | |
| const OpenLog & | vortex::bsp::host::Log () noexcept |
| What the managers asked the binding for since the last Reset(). | |
| void | vortex::bsp::host::SetI2cPresent (uint8_t address, bool present=true) noexcept |
Simulate a chip that acknowledges address on the I2C bus (probe and scan see it). | |
| MockUart * | vortex::bsp::host::Uart () noexcept |
| MockCan * | vortex::bsp::host::Can () noexcept |
| MockSpi * | vortex::bsp::host::Spi (int index) noexcept |
| SPI device by the index SpiAddDevice() returned. | |
| MockI2c * | vortex::bsp::host::I2c (int index) noexcept |
| I2C device by the index I2cAddDevice() returned. | |
| MockI2c * | vortex::bsp::host::I2cAt (uint8_t address) noexcept |
I2C device added at address, or nullptr. | |
| MockGpio * | vortex::bsp::host::Gpio (HfFunctionalGpioPin pin) noexcept |
| MCU GPIO of a functional pin, or nullptr if McuGpioOpen() was not called for it. | |
| MockNvs & | vortex::bsp::host::NvsMock (NvsRegion region) noexcept |
| MockTemperature & | vortex::bsp::host::Temperature () noexcept |
| const std::vector< LedFrame > & | vortex::bsp::host::LedFrames () noexcept |
| Frames latched onto the status LED since the last Reset(). | |
| bool | vortex::bsp::host::LedOpen () noexcept |
| True while the status LED is open. | |
Host implementation of the Vortex board binding, over the hf-core host mocks.
Built only by tests/host. Every bus, pin and store the managers open through VortexBoardBind.h is an hf::host::Mock* object that a test can reach through the accessors below to script it (responders, injected faults) and inspect what the manager sent. Reset() closes everything and clears the scripted failures; call it at the start of each test case.
Thread safety: none (host tests are single-threaded).