|
FastLED 3.9.15
|
Minimal interface for LED channel transmission drivers.
Pure interface with no state management. Concrete implementations handle their own batching, error tracking, and cleanup logic.
State Machine Behavior: Typical flow: READY → BUSY → DRAINING → READY
Usage Pattern:
Implementation Guidelines:
#include <driver.h>
Inheritance diagram for fl::IChannelDriver:Classes | |
| struct | Capabilities |
| Driver capabilities. More... | |
| struct | DriverState |
| Driver state with optional error message. More... | |
| struct | PollNeededCallback |
| ISR-safe callback handle invoked when the manager should poll again. More... | |
| class | PollNeededCallbackSlot |
| ISR-safe storage for a poll-needed callback handle. More... | |
Public Member Functions | |
| virtual | ~IChannelDriver () FL_NOEXCEPT=default |
| Virtual destructor. | |
| virtual bool | canHandle (const ChannelDataPtr &data) const FL_NOEXCEPT=0 |
| Check if this driver can handle the given channel data. | |
| virtual void | enqueue (ChannelDataPtr channelData) FL_NOEXCEPT=0 |
| Enqueue channel data for transmission. | |
| virtual Capabilities | getCapabilities () const FL_NOEXCEPT=0 |
| Get driver capabilities (clockless, SPI, or both) | |
| virtual fl::string | getName () const FL_NOEXCEPT |
| Get the driver name for affinity binding. | |
| virtual DriverState | poll () FL_NOEXCEPT=0 |
| Query driver state and perform maintenance. | |
| virtual void | setPollNeededCallback (PollNeededCallback callback) FL_NOEXCEPT |
| Install the manager-owned poll-needed callback for ISR wakeups. | |
| virtual void | show () FL_NOEXCEPT=0 |
| Trigger transmission of enqueued data. | |
| virtual bool | waitDone (u32 timeoutMs=1000) FL_NOEXCEPT |
| Block until this driver finishes any in-flight transmit. | |
| bool | waitForReady (u32 timeoutMs=1000) FL_NOEXCEPT |
| Wait for driver to become READY. | |
| bool | waitForReadyOrDraining (u32 timeoutMs=1000) FL_NOEXCEPT |
Protected Member Functions | |
| IChannelDriver () FL_NOEXCEPT=default | |
| IChannelDriver (const IChannelDriver &) FL_NOEXCEPT=delete | |
| IChannelDriver (IChannelDriver &&) FL_NOEXCEPT=delete | |
| IChannelDriver & | operator= (const IChannelDriver &) FL_NOEXCEPT=delete |
| IChannelDriver & | operator= (IChannelDriver &&) FL_NOEXCEPT=delete |
| template<typename Condition> | |
| bool | waitForCondition (Condition condition, u32 timeoutMs=1000) FL_NOEXCEPT |