|
HardFOC Vortex V1 HAL
Unified HAL API for the HardFOC Vortex motor-control platform (ESP32-C6, TMC9660)
|
LED management for the HardFOC Vortex V1 platform (single WS2812). More...
#include "handlers/logger/Logger.h"#include "RtosMutex.h"#include "core/hf-core-drivers/internal/hf-pincfg/src/hf_functional_pin_config_vortex_v1.hpp"#include <cstdint>#include <atomic>Go to the source code of this file.
Classes | |
| struct | LedColor |
| Simple RGB colour triplet. More... | |
| struct | LedSystemDiagnostics |
| Snapshot of LED subsystem health and counters. More... | |
| class | LedManager |
| Singleton that drives the on-board WS2812 LED via ESP-IDF RMT. More... | |
Namespaces | |
| namespace | LedColors |
| Predefined named colour constants. | |
Enumerations | |
| enum class | LedError : uint8_t { SUCCESS = 0 , NOT_INITIALIZED , INITIALIZATION_FAILED , INVALID_PARAMETER , HARDWARE_ERROR , ANIMATION_FAILED , INVALID_COLOR , INVALID_BRIGHTNESS } |
| Error codes returned by LedManager operations. More... | |
| enum class | LedAnimation : uint8_t { OFF = 0 , SOLID , BLINK , BREATH , RAINBOW , STATUS_OK , STATUS_WARN , STATUS_ERROR , STATUS_BOOT , STATUS_CALIBRATE } |
| Available LED animation modes. More... | |
Functions | |
| constexpr const char * | LedErrorToString (LedError error) noexcept |
| Convert a LedError to a human-readable C-string. | |
| constexpr const char * | LedAnimationToString (LedAnimation animation) noexcept |
| Convert a LedAnimation to a human-readable C-string. | |
| static constexpr LedColor | LedColors::BLACK (0, 0, 0) |
| Off / black. | |
| static constexpr LedColor | LedColors::RED (255, 0, 0) |
| Pure red. | |
| static constexpr LedColor | LedColors::GREEN (0, 255, 0) |
| Pure green. | |
| static constexpr LedColor | LedColors::BLUE (0, 0, 255) |
| Pure blue. | |
| static constexpr LedColor | LedColors::YELLOW (255, 255, 0) |
| Yellow. | |
| static constexpr LedColor | LedColors::CYAN (0, 255, 255) |
| Cyan. | |
| static constexpr LedColor | LedColors::MAGENTA (255, 0, 255) |
| Magenta. | |
| static constexpr LedColor | LedColors::WHITE (255, 255, 255) |
| Full white. | |
| static constexpr LedColor | LedColors::ORANGE (255, 165, 0) |
| Orange. | |
| static constexpr LedColor | LedColors::PURPLE (128, 0, 128) |
| Purple. | |
| LedManager & | GetLedManager () noexcept |
| Convenience accessor — equivalent to LedManager::GetInstance(). | |
LED management for the HardFOC Vortex V1 platform (single WS2812).
Single WS2812 LED on the pin map's WS2812_LED_DAT row (GPIO3). Provides solid/blink/breath/rainbow animations plus system status indication (boot, ready, error…).
MCU-free: the LED is driven through the board binding (vortex::bsp::StatusLed*), which on the ESP32-C6 uses hf-core's Ws2812Handler over RMT. This manager keeps only colour, brightness and animation state, all value types.
|
strong |
Available LED animation modes.
|
strong |
Error codes returned by LedManager operations.
|
inlinenoexcept |
Convenience accessor — equivalent to LedManager::GetInstance().
|
constexprnoexcept |
Convert a LedAnimation to a human-readable C-string.
| animation | The animation type to convert. |
animation.
|
constexprnoexcept |
Convert a LedError to a human-readable C-string.
| error | The error code to convert. |
error.