|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
GPIO management for the HardFOC Vortex V1 platform. More...
#include <array>#include <atomic>#include <cstdint>#include <optional>#include <string_view>#include "base/BaseGpio.h"#include "handlers/pcal95555/Pcal95555Handler.h"#include "RtosMutex.h"#include "core/hf-core-drivers/internal/hf-pincfg/src/hf_functional_pin_config_vortex_v1.hpp"Go to the source code of this file.
Classes | |
| struct | GpioEntry |
| A single GPIO entry in the fixed-size registry. More... | |
| struct | GpioSystemDiagnostics |
| System-level GPIO diagnostics snapshot. More... | |
| class | GpioManager |
| Singleton managing GPIO pins across ESP32, PCAL95555 I/O expander, and TMC9660 controllers. More... | |
Functions | |
| GpioManager & | GetGpioManager () noexcept |
| Convenience accessor — equivalent to GpioManager::GetInstance(). | |
GPIO management for the HardFOC Vortex V1 platform.
The Vortex board spans three GPIO chip types:
Uses a fixed-size std::array indexed by the platform mapping index (all pins known at compile time) instead of a heap-allocated unordered_map. String lookups iterate the constexpr mapping table.
Vortex TMC9660 / PCAL: motor-facing lines use PCAL_TMC_* (e.g. DRV_EN, RST, SPI mux, WAKE). TMC9660 GPIO17/18 are duplicated — read via PCAL inputs PCAL_TMC_GPIO17_EXP_IN / PCAL_TMC_GPIO18_EXP_IN (I²C expander), or configure/read the same nets through TMC_GPIO17 / TMC_GPIO18 once the handler bridge is registered.
Each entry stores a non-owning BaseGpio* (no heap, no reference counting). The pin objects live in static storage for the life of the manager:
Pointers returned by Get() stay valid until Deinitialize() (or, for the two TMC9660 pins, until MotorController::Deinitialize()).
|
inlinenoexcept |
Convenience accessor — equivalent to GpioManager::GetInstance().