449 {
451
452
454 FL_WARN(
"Channel '" <<
mName <<
"': showPixels() called while mChannelData is in use by driver, attempting to wait");
456 if (!driver) {
457 FL_ERROR(
"Channel '" <<
mName <<
"': No driver bound yet the mChannelData is in use - cannot transmit");
458 return;
459 }
460
461 bool ok = driver->waitForReady();
462 if (!ok) {
463 FL_ERROR(
"Channel '" <<
mName <<
"': Timeout occurred while waiting for driver to become READY");
464 return;
465 }
466 FL_WARN(
"Channel '" <<
mName <<
"': Engine became READY after waiting");
467 }
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483 fl::shared_ptr<IChannelDriver> driver;
486 if (!driver) {
487
488
489 return;
490 }
491 } else {
492#if !defined(FASTLED_DISABLE_DYNAMIC_DRIVER) || !FASTLED_DISABLE_DYNAMIC_DRIVER
494 if (!driver) {
495 return;
496 }
497#else
498
499
500
501
502
503
504
505
506 return;
507#endif
508 }
509
510
511
512
513
518
519
521 data.clear();
522
523 if (
mChipset.is<ClocklessChipset>()) {
524
525 const ClocklessChipset* clockless =
mChipset.ptr<ClocklessChipset>();
526 switch (clockless->encoder) {
529 break;
530#if !defined(FASTLED_DISABLE_UCS7604) || !FASTLED_DISABLE_UCS7604
531
532
533
534
535
536
537
538
539
545 break;
546#endif
547 }
548#if !defined(FASTLED_DISABLE_SPI_CHIPSETS) || !FASTLED_DISABLE_SPI_CHIPSETS
549 }
else if (
mChipset.is<SpiChipsetConfig>()) {
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564 const SpiChipsetConfig* spi =
mChipset.ptr<SpiChipsetConfig>();
565 const SpiEncoder& config = spi->timing;
566
567
568
569 switch (config.chipset) {
574 break;
575
580 break;
581
584 break;
585
588 break;
589
592 break;
593
596 break;
597
600 break;
601
604 break;
605
608 break;
609
612 break;
613
616 break;
617 }
618
619 }
620#endif
621
622
623 {
626 }
627
628
629
630
631
632
633
634
635
636
637
638
639
640 fl::string driverName = driver->getName();
643#if FASTLED_LOG_RUNTIME_ENABLED
649 }
650#endif
651
652
653
654
655
656
657
658 return;
660#if FASTLED_LOG_RUNTIME_ENABLED
661
663#endif
664 }
665
666
667
668
669
672 events.onChannelEnqueued(*this, driver->getName());
673}
FL_NO_INLINE fl::shared_ptr< IChannelDriver > resolveDynamicDriver()
Cold slow-path helper for showPixels() when the driver was NOT pre-bound via setDriver().
ChannelDataPtr mChannelData
bool mDisabledDriverWarned
fl::weak_ptr< IChannelDriver > mDriver
@ STATUS_ENABLED
Driver is registered and enabled.
@ STATUS_DISABLED
Driver is registered but disabled.
static ChannelManager & instance() FL_NOEXCEPT
Get the global singleton instance.
DriverStatus driverStatus(const fl::string &name) const FL_NOEXCEPT
Look up a driver's registration status without logging on miss.
void writeHD108(CONTAINER_UIN8_T *out) FL_NOEXCEPT
Encode pixels in HD108 format (zero allocation)
void writeAPA102(CONTAINER_UIN8_T *out, bool hd_gamma=false) FL_NOEXCEPT
Encode pixels in APA102/DOTSTAR format (zero allocation)
void writeP9813(CONTAINER_UIN8_T *out) FL_NOEXCEPT
Encode pixels in P9813 format (zero allocation)
void writeWS2801(CONTAINER_UIN8_T *out) FL_NOEXCEPT
Encode pixels in WS2801 format (zero allocation)
void writeSM16716(CONTAINER_UIN8_T *out) FL_NOEXCEPT
Encode pixels in SM16716 format (zero allocation)
void writeLPD6803(CONTAINER_UIN8_T *out) FL_NOEXCEPT
Encode pixels in LPD6803 format (zero allocation)
void writeWS2812(CONTAINER_UIN8_T *out) FL_NOEXCEPT
void writeSK9822(CONTAINER_UIN8_T *out, bool hd_gamma=false) FL_NOEXCEPT
Encode pixels in SK9822 format (zero allocation)
void writeWS2803(CONTAINER_UIN8_T *out) FL_NOEXCEPT
Encode pixels in WS2803 format (zero allocation)
void writeLPD8806(CONTAINER_UIN8_T *out) FL_NOEXCEPT
Encode pixels in LPD8806 format (zero allocation)
const XYMap * getXYMap() const FL_NOEXCEPT
Get the source XYMap as a raw const pointer.
static FL_NO_INLINE void emitDisabledDriverError(const fl::string &channelName, const fl::string &driverName, const fl::string &exclusive) FL_NOEXCEPT
Out-of-line cold-path emitter for the #2517 silent-drop DISABLED-driver diagnostic in Channel::showPi...
void writeUCS7604(fl::vector_psram< u8 > *data, PixelIterator &pixelIterator, ClocklessEncoder encoder, const ChannelOptions &settings, EOrder rgbOrder)
Encode UCS7604 pixel data into the channel data buffer.
@ CLOCKLESS_ENCODER_UCS7604_8BIT
UCS7604 8-bit 800KHz.
@ CLOCKLESS_ENCODER_UCS7604_16BIT
UCS7604 16-bit 800KHz.
@ CLOCKLESS_ENCODER_UCS7604_16BIT_1600
UCS7604 16-bit 1600KHz.
@ CLOCKLESS_ENCODER_WS2812
Default, no preamble (WS2812 and compatible)
@ SM16716
SM16716 LED chipset.
@ LPD6803
LPD6803 LED chipset.
@ APA102HD
APA102 LED chipset with 5-bit gamma correction.
@ HD107
Same as APA102, but in turbo 40-mhz mode.
@ DOTSTARHD
APA102HD LED chipset alias.
@ SK9822HD
SK9822 LED chipset with 5-bit gamma correction.
@ SK9822
SK9822 LED chipset.
@ DOTSTAR
APA102 LED chipset alias.
@ P9813
P9813 LED chipset.
@ APA102
APA102 LED chipset.
@ HD108
16-bit variant of HD107, always gamma corrected. No SD (standard definition) option available - all H...
@ LPD8806
LPD8806 LED chipset.
@ WS2803
WS2803 LED chipset.
@ WS2801
WS2801 LED chipset.
@ HD107HD
Same as APA102HD, but in turbo 40-mhz mode.
fl::PixelIterator PixelIterator
static ChannelEvents & instance()
Rgbww rgbww() const FL_NOEXCEPT
Rgbw rgbw() const FL_NOEXCEPT