21 :
Spi(
SpiConfig(clock_pin, data_pins, clock_speed_hz, output_mode, 0)) {
29 if (num_lanes < 1 || num_lanes > 8) {
30 FL_WARN(
"fl::Spi: Invalid number of data pins (" << num_lanes <<
"), must be 1-8");
47 FL_DBG(
"fl::Spi: Created MultiLaneDevice with " << num_lanes <<
" lane(s)");
50 auto begin_result =
device->begin();
53 FL_WARN(
"fl::Spi: begin() failed");
83 return device->waitComplete(timeout_ms);
Multi-lane SPI interface for LED output Hardware (SPI_HW): 1-8 parallel data lanes Software (SPI_BITB...
~Spi() FL_NOEXCEPT
Destructor (defined out-of-line in spi.cpp.hpp to keep MultiLaneDevice destructor out of callers' com...
Spi() FL_NOEXCEPT
Default constructor - creates device in error state.
bool wait(u32 timeout_ms=0xFFFFFFFF)
Wait for async write operation to complete.
Spi & operator=(Spi &&other) FL_NOEXCEPT
Move assignment.
fl::unique_ptr< spi::MultiLaneDevice > device
fl::size size() const FL_NOEXCEPT
void resize(fl::size n) FL_NOEXCEPT
Centralized logging categories for FastLED hardware interfaces and subsystems.
Multi-lane SPI device for 2-8 independent LED strips.
constexpr remove_reference< T >::type && move(T &&t) FL_NOEXCEPT
spi_output_mode_t
SPI output mode for multi-lane devices.
fl::enable_if<!fl::is_array< T >::value, unique_ptr< T > >::type make_unique(Args &&... args) FL_NOEXCEPT
@ NOT_INITIALIZED
Object not initialized.
Base definition for an LED controller.
u32 clock_speed_hz
Clock frequency in Hz (0xffffffff = as fast as possible)
int clock_pin
SCK pin number.
fl::vector< int > data_pins
Data pins (1 = single-lane, 2-8 = multi-lane)
u8 spi_mode
SPI mode 0-3 (CPOL/CPHA)
Configuration for SPI device (supports 1-8 lanes)
u32 clock_speed_hz
Clock speed in Hz (0xffffffff = as fast as possible)
u8 mode
SPI mode (CPOL/CPHA)
u8 clock_pin
Shared clock pin (SCK)
fl::vector< u8 > data_pins
Data pins (1-8 pins)
Configuration for multi-lane SPI.