|
FastLED 3.10.8
|
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_NO_EXCEPT=default |
| Virtual destructor. | |
| virtual bool | canHandle (const ChannelDataPtr &data) const FL_NO_EXCEPT=0 |
| Check if this driver can handle the given channel data. | |
| HandleResult | canMatch (const ChannelRequest &request) const FL_NO_EXCEPT |
| Predicate: can this driver match a (single- or multi-pin) request? | |
| virtual void | enqueue (ChannelDataPtr channelData) FL_NO_EXCEPT=0 |
| Enqueue channel data for transmission. | |
| virtual Capabilities | getCapabilities () const FL_NO_EXCEPT=0 |
| Get driver capabilities (clockless, SPI, or both) | |
| virtual DriverCapabilities | getDriverCapabilities () const FL_NO_EXCEPT |
| Driver-wide capability descriptor (declarative form). | |
| virtual fl::string | getName () const FL_NO_EXCEPT |
| Get the driver name for affinity binding. | |
| virtual fl::span< const PinGroup > | getPinGroups () const FL_NO_EXCEPT |
| Per-resource group enumeration. | |
| virtual DriverState | poll () FL_NO_EXCEPT=0 |
| Query driver state and perform maintenance. | |
| virtual void | setPollNeededCallback (PollNeededCallback callback) FL_NO_EXCEPT |
| Install the manager-owned poll-needed callback for ISR wakeups. | |
| virtual void | show () FL_NO_EXCEPT=0 |
| Trigger transmission of enqueued data. | |
| virtual bool | waitDone (u32 timeoutMs=1000) FL_NO_EXCEPT |
| Block until this driver finishes any in-flight transmit. | |
| bool | waitForReady (u32 timeoutMs=1000) FL_NO_EXCEPT |
| Wait for driver to become READY. | |
| bool | waitForReadyOrDraining (u32 timeoutMs=1000) FL_NO_EXCEPT |
Protected Member Functions | |
| IChannelDriver () FL_NO_EXCEPT=default | |
| IChannelDriver (const IChannelDriver &) FL_NO_EXCEPT=delete | |
| IChannelDriver (IChannelDriver &&) FL_NO_EXCEPT=delete | |
| IChannelDriver & | operator= (const IChannelDriver &) FL_NO_EXCEPT=delete |
| IChannelDriver & | operator= (IChannelDriver &&) FL_NO_EXCEPT=delete |
| template<typename Condition> | |
| bool | waitForCondition (Condition condition, u32 timeoutMs=1000) FL_NO_EXCEPT |