pub struct Ws2812<SPI, DEVICE = Ws2812> { /* private fields */ }
Implementations§
Source§impl<SPI, E> Ws2812<SPI, Sk6812w>
impl<SPI, E> Ws2812<SPI, Sk6812w>
Sourcepub fn new_sk6812w(spi: SPI) -> Self
pub fn new_sk6812w(spi: SPI) -> Self
Use sk6812w devices via spi
The SPI bus should run within 2.3 MHz to 3.8 MHz at least.
You may need to look at the datasheet and your own hal to verify this.
Please ensure that the mcu is pretty fast, otherwise weird timing issues will occur
Trait Implementations§
Source§impl<SPI, E> SmartLedsWrite for Ws2812<SPI>
impl<SPI, E> SmartLedsWrite for Ws2812<SPI>
Source§impl<SPI, E> SmartLedsWrite for Ws2812<SPI, Sk6812w>
impl<SPI, E> SmartLedsWrite for Ws2812<SPI, Sk6812w>
Auto Trait Implementations§
impl<SPI, DEVICE> Freeze for Ws2812<SPI, DEVICE>where
SPI: Freeze,
impl<SPI, DEVICE> RefUnwindSafe for Ws2812<SPI, DEVICE>where
SPI: RefUnwindSafe,
DEVICE: RefUnwindSafe,
impl<SPI, DEVICE> Send for Ws2812<SPI, DEVICE>
impl<SPI, DEVICE> Sync for Ws2812<SPI, DEVICE>
impl<SPI, DEVICE> Unpin for Ws2812<SPI, DEVICE>
impl<SPI, DEVICE> UnwindSafe for Ws2812<SPI, DEVICE>where
SPI: UnwindSafe,
DEVICE: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more