|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
Encoder device management for the HardFOC Vortex V1 platform. More...
#include <array>#include <atomic>#include <optional>#include "RtosMutex.h"#include "handlers/as5047u/As5047uHandler.h"Go to the source code of this file.
Classes | |
| struct | EncoderFieldStrength |
| Magnet field readings of one AS5047U (see EncoderManager::ReadFieldStrength()). More... | |
| struct | EncoderSystemDiagnostics |
| System-level diagnostics snapshot for encoder health monitoring. More... | |
| struct | EncoderSystemDiagnostics::DeviceSnapshot |
| Per-device health snapshot. More... | |
| class | EncoderManager |
| Singleton for managing multiple AS5047U encoder devices with indexed access. More... | |
Typedefs | |
| using | As5047uError = EncoderError |
| Backward-compatible alias for EncoderError. | |
Enumerations | |
| enum class | EncoderError : uint8_t { SUCCESS = 0 , NOT_INITIALIZED , INITIALIZATION_FAILED , INVALID_PARAMETER , SPI_COMMUNICATION_FAILED , CRC_ERROR , FRAMING_ERROR , SENSOR_ERROR , TIMEOUT , MUTEX_LOCK_FAILED } |
| Generic encoder manager error codes. More... | |
Functions | |
| constexpr const char * | EncoderErrorToString (EncoderError error) noexcept |
| Convert EncoderError to a human-readable string. | |
| constexpr const char * | As5047uErrorToString (As5047uError error) noexcept |
| Backward-compatible helper — calls EncoderErrorToString(). | |
| EncoderManager & | GetEncoderManager () noexcept |
| Convenience accessor — equivalent to EncoderManager::GetInstance(). | |
Encoder device management for the HardFOC Vortex V1 platform.
Manages up to four AS5047U position encoder devices. The Vortex V1 board has no onboard encoder — all devices are user-provisioned via CreateAs5047uDevice(). The board provides a dedicated SPI CS pin (SpiDeviceId::AS5047U_POSITION_ENCODER, GPIO 20) plus two external CS slots that can each host an AS5047U or other SPI sensor.
| using As5047uError = EncoderError |
Backward-compatible alias for EncoderError.
|
strong |
Generic encoder manager error codes.
These are manager-layer errors and are intentionally encoder-family agnostic. Handler/driver internals keep native driver error flags and are translated into this common manager error domain.
|
constexprnoexcept |
Backward-compatible helper — calls EncoderErrorToString().
| error | Error code to convert. |
|
constexprnoexcept |
Convert EncoderError to a human-readable string.
| error | Error code to convert. |
|
inlinenoexcept |
Convenience accessor — equivalent to EncoderManager::GetInstance().