|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
Communication channels manager for the HardFOC Vortex V1 platform. More...
#include <array>#include <atomic>#include <cstdint>#include <memory>#include "base/BaseSpi.h"#include "base/BaseI2c.h"#include "base/BaseUart.h"#include "base/BaseCan.h"#include "RtosMutex.h"Go to the source code of this file.
Classes | |
| struct | CommSystemDiagnostics |
| System-level diagnostics snapshot for communication channels. More... | |
| class | CommChannelsManager |
| Singleton managing all board communication channels for Vortex V1. More... | |
| struct | CommChannelsManager::RuntimeI2cSlot |
Enumerations | |
| enum class | CommError : uint8_t { SUCCESS = 0 , NOT_INITIALIZED , INITIALIZATION_FAILED , BUS_NOT_AVAILABLE , DEVICE_NOT_FOUND , INVALID_BUS_INDEX , INVALID_DEVICE_INDEX , DEVICE_ALREADY_EXISTS , DEVICE_CREATION_FAILED , COMMUNICATION_FAILED , INVALID_PARAMETER , MUTEX_LOCK_FAILED } |
| Communication channels manager error codes for consistent error reporting. More... | |
| enum class | SpiDeviceId : uint8_t { TMC9660_MOTOR_CONTROLLER = 0 , AS5047U_POSITION_ENCODER = 1 , EXTERNAL_DEVICE_1 = 2 , EXTERNAL_DEVICE_2 = 3 , DEVICE_COUNT } |
| SPI device identifiers for the Vortex V1 board. More... | |
| enum class | I2cDeviceId : uint8_t { BNO08X_IMU = 0 , PCAL9555_GPIO_EXPANDER = 1 , DEVICE_COUNT } |
| I2C device identifiers for the Vortex V1 board (built-in devices). More... | |
Functions | |
| constexpr const char * | CommErrorToString (CommError error) noexcept |
| Convert CommError to a human-readable string. | |
| CommChannelsManager & | GetCommChannelsManager () noexcept |
| Convenience accessor — equivalent to CommChannelsManager::GetInstance(). | |
Communication channels manager for the HardFOC Vortex V1 platform.
Manages all board communication buses (SPI, I2C, UART, CAN) for the Vortex motor-control board. The Vortex board uses:
MCU-free: the bus objects are created by the board binding (bsp_bind/VortexBoardBind.h, ESP32-C6 implementation in bsp_bind/esp32c6/), which keeps them in static storage. This manager holds device indices and non-owning Base* pointers, and one RtosMutex.
Extends with runtime I2C device creation for ImuManager (external BNO08x devices).
|
strong |
Communication channels manager error codes for consistent error reporting.
Manager-layer errors for communication bus lifecycle and device operations. Covers SPI, I2C, UART, and CAN bus management failures.
|
strong |
I2C device identifiers for the Vortex V1 board (built-in devices).
| Enumerator | |
|---|---|
| BNO08X_IMU | BNO08x IMU sensor (address 0x4A) |
| PCAL9555_GPIO_EXPANDER | PCAL95555 GPIO expander (address 0x20) |
| DEVICE_COUNT | Sentinel — total number of built-in I2C devices. |
|
strong |
SPI device identifiers for the Vortex V1 board.
The order matches the CS pin configuration in the CommChannelsManager.
|
constexprnoexcept |
Convert CommError to a human-readable string.
| error | Error code to convert. |
|
inlinenoexcept |
Convenience accessor — equivalent to CommChannelsManager::GetInstance().