107 if (callback.callback ==
nullptr) {
121 if (snapshot ==
nullptr) {
129 if (snapshot ==
nullptr) {
139 while (snapshot !=
nullptr) {
269 template<typename Condition>
Transmission data for a single LED channel.
~PollNeededCallbackSlot() FL_NOEXCEPT
PollNeededCallbackSlot() FL_NOEXCEPT
void invoke() const FL_NOEXCEPT
fl::atomic< Snapshot * > mSnapshot
void retire(Snapshot *snapshot) FL_NOEXCEPT
static void destroySnapshots(Snapshot *snapshot) FL_NOEXCEPT
void set(PollNeededCallback callback) FL_NOEXCEPT
virtual void enqueue(ChannelDataPtr channelData) FL_NOEXCEPT=0
Enqueue channel data for transmission.
virtual void setPollNeededCallback(PollNeededCallback callback) FL_NOEXCEPT
Install the manager-owned poll-needed callback for ISR wakeups.
bool waitForReadyOrDraining(u32 timeoutMs=1000) FL_NOEXCEPT
virtual ~IChannelDriver() FL_NOEXCEPT=default
Virtual destructor.
virtual fl::string getName() const FL_NOEXCEPT
Get the driver name for affinity binding.
IChannelDriver() FL_NOEXCEPT=default
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 waitForCondition(Condition condition, u32 timeoutMs=1000) FL_NOEXCEPT
bool waitForReady(u32 timeoutMs=1000) FL_NOEXCEPT
Wait for driver to become READY.
virtual bool canHandle(const ChannelDataPtr &data) const FL_NOEXCEPT=0
Check if this driver can handle the given channel data.
virtual Capabilities getCapabilities() const FL_NOEXCEPT=0
Get driver capabilities (clockless, SPI, or both)
virtual DriverState poll() FL_NOEXCEPT=0
Query driver state and perform maintenance.
static string from_literal(const char *literal) FL_NOEXCEPT
#define constexpr
Declares that it is possible to evaluate a value at compile time, introduced in C++11.
Base definition for an LED controller.
#define FASTLED_SHARED_PTR(type)
constexpr Capabilities() FL_NOEXCEPT
Default constructor (no capabilities)
bool supportsClockless
Supports clockless protocols (WS2812, SK6812, etc.)
constexpr Capabilities(bool clockless, bool spi) FL_NOEXCEPT
Constructor with explicit capabilities.
bool supportsSpi
Supports SPI protocols (APA102, SK9822, etc.)
bool operator!=(Value v) const FL_NOEXCEPT
DriverState(Value v, const fl::string &e) FL_NOEXCEPT
Construct from state and error message.
fl::string error
Error message (only populated when state == ERROR)
Value state
Current driver state.
@ 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) FL_NOEXCEPT
Construct from state only (no error)
bool operator==(Value v) const FL_NOEXCEPT
Comparison operators for backward compatibility.
Driver state with optional error message.
void(*)(void *) FL_NOEXCEPT Callback
constexpr PollNeededCallback() FL_NOEXCEPT=default
void invoke() const FL_NOEXCEPT
bool isValid() const FL_NOEXCEPT
ISR-safe callback handle invoked when the manager should poll again.
PollNeededCallback callback
Snapshot(PollNeededCallback cb) FL_NOEXCEPT