|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
IMU device management for the HardFOC Vortex V1 platform. More...
#include <array>#include <optional>#include "RtosMutex.h"#include "SignalSemaphore.h"#include "handlers/bno08x/Bno08xHandler.h"Go to the source code of this file.
Classes | |
| struct | ImuSystemDiagnostics |
| System-level diagnostics snapshot for IMU health monitoring. More... | |
| struct | ImuSystemDiagnostics::DeviceSnapshot |
| Per-device health snapshot. More... | |
| class | ImuManager |
| Singleton for managing multiple IMU devices with indexed access and flexible device management. More... | |
Typedefs | |
| using | ImuInterruptCallback = void(*)(void *user_data) |
| Callback for the onboard IMU interrupt (task context: the PCAL95555 handler dispatches it). | |
Enumerations | |
| enum class | ImuError : uint8_t { SUCCESS = 0 , NOT_INITIALIZED , INITIALIZATION_FAILED , DEVICE_ALREADY_EXISTS , DEVICE_NOT_FOUND , INVALID_DEVICE_INDEX , CANNOT_DELETE_ONBOARD , INVALID_I2C_ADDRESS , DEPENDENCY_NOT_READY , COMMUNICATION_FAILED , I2C_DEVICE_CREATION_FAILED , HANDLER_CREATION_FAILED , INTERRUPT_ERROR , ALREADY_DEINITIALIZED , MUTEX_LOCK_FAILED } |
| IMU manager error codes for consistent error reporting. More... | |
Functions | |
| constexpr const char * | ImuErrorToString (ImuError error) noexcept |
| Convert ImuError to a human-readable string. | |
| ImuManager & | GetImuManager () noexcept |
| Convenience accessor — equivalent to ImuManager::GetInstance(). | |
IMU device management for the HardFOC Vortex V1 platform.
Manages multiple BNO08x IMU devices. The onboard IMU (index 0) is auto-created via CommChannelsManager I²C; up to three external IMU devices (indices 1–3) can be added at runtime over I²C or SPI. Includes GPIO interrupt support for data-ready signalling.
| using ImuInterruptCallback = void (*)(void* user_data) |
Callback for the onboard IMU interrupt (task context: the PCAL95555 handler dispatches it).
| user_data | The pointer given to ImuManager::ConfigureInterrupt(). |
|
strong |
IMU manager error codes for consistent error reporting.
Manager-layer errors for BNO08x device lifecycle and data operations. Driver-level BNO08x errors are handled internally by the handler.
| Enumerator | |
|---|---|
| SUCCESS | Operation completed successfully. |
| NOT_INITIALIZED | Manager not yet initialised. |
| INITIALIZATION_FAILED | Device initialisation failed. |
| DEVICE_ALREADY_EXISTS | A device already occupies this slot. |
| DEVICE_NOT_FOUND | No active device at the given index. |
| INVALID_DEVICE_INDEX | Device index out of valid range. |
| CANNOT_DELETE_ONBOARD | Onboard device (index 0) cannot be deleted. |
| INVALID_I2C_ADDRESS | I²C address outside 0x08–0x77. |
| DEPENDENCY_NOT_READY | Required dependency not initialised. |
| COMMUNICATION_FAILED | A bus-level transfer failed. |
| I2C_DEVICE_CREATION_FAILED | CommChannelsManager I²C device creation failed. |
| HANDLER_CREATION_FAILED | Heap allocation or handler init failed. |
| INTERRUPT_ERROR | GPIO interrupt configuration failed. |
| ALREADY_DEINITIALIZED | Manager already in deinitialized state. |
| MUTEX_LOCK_FAILED | RTOS mutex acquire timed out. |
|
inlinenoexcept |
Convenience accessor — equivalent to ImuManager::GetInstance().
|
constexprnoexcept |
Convert ImuError to a human-readable string.
| error | Error code to convert. |