110 if (callback.callback ==
nullptr) {
124 if (snapshot ==
nullptr) {
132 if (snapshot ==
nullptr) {
142 while (snapshot !=
nullptr) {
315 template<typename Condition>
Free function that decides whether a ChannelRequest can be served by a driver's published capability ...
Declarative driver capabilities + channel-request types for the Channel Manager's predicate / depende...
Transmission data for a single LED channel.
void clear() FL_NO_EXCEPT
PollNeededCallbackSlot() FL_NO_EXCEPT
void invoke() const FL_NO_EXCEPT
~PollNeededCallbackSlot() FL_NO_EXCEPT
fl::atomic< Snapshot * > mSnapshot
void set(PollNeededCallback callback) FL_NO_EXCEPT
void retire(Snapshot *snapshot) FL_NO_EXCEPT
static void destroySnapshots(Snapshot *snapshot) FL_NO_EXCEPT
IChannelDriver() FL_NO_EXCEPT=default
virtual ~IChannelDriver() FL_NO_EXCEPT=default
Virtual destructor.
virtual void setPollNeededCallback(PollNeededCallback callback) FL_NO_EXCEPT
Install the manager-owned poll-needed callback for ISR wakeups.
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.
bool waitForCondition(Condition condition, u32 timeoutMs=1000) FL_NO_EXCEPT
virtual Capabilities getCapabilities() const FL_NO_EXCEPT=0
Get driver capabilities (clockless, SPI, or both)
HandleResult canMatch(const ChannelRequest &request) const FL_NO_EXCEPT
Predicate: can this driver match a (single- or multi-pin) request?
virtual bool canHandle(const ChannelDataPtr &data) const FL_NO_EXCEPT=0
Check if this driver can handle the given channel data.
virtual void enqueue(ChannelDataPtr channelData) FL_NO_EXCEPT=0
Enqueue channel data for transmission.
virtual fl::span< const PinGroup > getPinGroups() const FL_NO_EXCEPT
Per-resource group enumeration.
virtual void show() FL_NO_EXCEPT=0
Trigger transmission of enqueued data.
virtual DriverState poll() FL_NO_EXCEPT=0
Query driver state and perform maintenance.
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
static string from_literal(const char *literal) FL_NO_EXCEPT
#define constexpr
Declares that it is possible to evaluate a value at compile time, introduced in C++11.
u8 u8 fract8 blur_amount FL_NO_EXCEPT
HandleResult canMatch(const DriverCapabilities &caps, fl::span< const PinGroup > groups, const ChannelRequest &request) FL_NO_EXCEPT
Test a request (single-pin OR multi-pin ganged) against a driver's published capability data.
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
bool supportsClockless
Supports clockless protocols (WS2812, SK6812, etc.)
constexpr Capabilities() FL_NO_EXCEPT
Default constructor (no capabilities)
bool supportsSpi
Supports SPI protocols (APA102, SK9822, etc.)
constexpr Capabilities(bool clockless, bool spi) FL_NO_EXCEPT
Constructor with explicit capabilities.
DriverState(Value v) FL_NO_EXCEPT
Construct from state only (no error)
bool operator!=(Value v) const FL_NO_EXCEPT
fl::string error
Error message (only populated when state == ERROR)
Value state
Current driver state.
bool operator==(Value v) const FL_NO_EXCEPT
Comparison operators for backward compatibility.
@ READY
Hardware idle; ready to accept new transmissions.
@ DRAINING
All channels submitted; still transmitting.
@ ERROR
Driver encountered an error.
@ BUSY
Active: channels transmitting or queued.
DriverState(Value v, const fl::string &e) FL_NO_EXCEPT
Construct from state and error message.
Driver state with optional error message.
constexpr PollNeededCallback() FL_NO_EXCEPT=default
bool isValid() const FL_NO_EXCEPT
void invoke() const FL_NO_EXCEPT
ISR-safe callback handle invoked when the manager should poll again.
PollNeededCallback callback
Snapshot(PollNeededCallback cb) FL_NO_EXCEPT