|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
Singleton class for managing multiple TMC9660 motor controllers and their interfaces. More...
#include "handlers/tmc9660/Tmc9660Handler.h"#include "CommChannelsManager.h"#include "RtosMutex.h"#include "api_helpers/Tmc9660DriveObservability.h"#include <span>#include <array>#include <atomic>#include <optional>Go to the source code of this file.
Classes | |
| struct | Tmc9660ControlPins |
| Bundle of host-side GPIO references for TMC9660 control pins. More... | |
| struct | MotorMechanics |
| Mechanical mapping between the motor (rotor) frame and the load (output-shaft) frame. More... | |
| struct | MotorAccessStats |
| TMCL access accounting per device (every batch MotorController sends on the device's behalf). More... | |
| struct | MotorSystemDiagnostics |
| System-level diagnostics snapshot for motor controller health monitoring. More... | |
| struct | MotorSystemDiagnostics::DeviceSnapshot |
| Per-device snapshot (indexed 0..MAX_TMC9660_DEVICES-1) More... | |
| class | MotorController |
| Singleton managing multiple TMC9660 motor controllers on Vortex V1. More... | |
Typedefs | |
| using | MotorParameterAccess = vortex::motor::ParamAccess |
| One element of a batch read / write. | |
| using | MotorParameterWrite = vortex::motor::ParamWrite |
| One entry of a parameter image. | |
| using | MotorTelemetrySet = vortex::motor::TelemetrySet |
| Which signals a telemetry read fetches. | |
| using | MotorTelemetryField = vortex::motor::TelemetryField |
| using | MotorTelemetrySnapshot = vortex::motor::MotorTelemetrySnapshot |
| using | MotorDriveDiagnostics = vortex::motor::MotorDriveDiagnostics |
| using | MotorApplyOptions = vortex::motor::ApplyOptions |
| using | MotorApplyResult = vortex::motor::ApplyResult |
Enumerations | |
| enum class | MotorError : uint8_t { SUCCESS = 0 , NOT_INITIALIZED , INITIALIZATION_FAILED , DEVICE_ALREADY_EXISTS , DEVICE_NOT_FOUND , INVALID_DEVICE_INDEX , CANNOT_DELETE_ONBOARD , DEPENDENCY_NOT_READY , COMMUNICATION_FAILED , INVALID_PARAMETER , HANDLER_CREATION_FAILED , MUTEX_LOCK_FAILED } |
| Motor controller manager error codes for consistent error reporting. More... | |
| enum class | Tmc9660HostSpiGateMode : uint8_t { Disabled = 0 , EnabledForHostSpiMotor = 1 } |
| Vortex-style host SPI steering to the onboard TMC9660 (PCAL95555 outputs). More... | |
Functions | |
| constexpr const char * | MotorErrorToString (MotorError error) noexcept |
| Convert MotorError to a human-readable string. | |
| MotorController & | GetMotorController () noexcept |
| Convenience accessor — equivalent to MotorController::GetInstance(). | |
Singleton class for managing multiple TMC9660 motor controllers and their interfaces.
This class provides a global singleton for managing TMC9660 motor controllers, including:
One element of a batch read / write.
One entry of a parameter image.
Which signals a telemetry read fetches.
|
strong |
Motor controller manager error codes for consistent error reporting.
Manager-layer errors for TMC9660 device lifecycle operations (create, delete, initialize). Driver-level TMC9660 errors are handled internally by the handler.
|
strong |
Vortex-style host SPI steering to the onboard TMC9660 (PCAL95555 outputs).
On Vortex, PCAL_TMC_SPI_COMM_EN (TMC_COMM_ENn, active-low) steers the shared SPI segment: asserted (SetActive) connects the ESP32 SPI master to the TMC9660; deasserted releases that path (e.g. host UART to TMC, or TMC-local SPI) per schematic.
| Enumerator | |
|---|---|
| Disabled | SPI mux released (UART motor path / idle). |
| EnabledForHostSpiMotor | Host SPI to TMC9660 ( |
|
inlinenoexcept |
Convenience accessor — equivalent to MotorController::GetInstance().
|
constexprnoexcept |
Convert MotorError to a human-readable string.
| error | Error code to convert. |