[−][src]Struct ws2812_spi::Ws2812
Implementations
impl<SPI, E> Ws2812<SPI> where
SPI: FullDuplex<u8, Error = E>,
[src]
SPI: FullDuplex<u8, Error = E>,
pub fn new(spi: SPI) -> Self
[src]
Use ws2812 devices via spi
The SPI bus should run within 2 MHz to 3.8 MHz
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
impl<SPI, E> Ws2812<SPI, Sk6812w> where
SPI: FullDuplex<u8, Error = E>,
[src]
SPI: FullDuplex<u8, Error = E>,
pub fn new_sk6812w(spi: SPI) -> Self
[src]
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
impl<SPI, E> SmartLedsWrite for Ws2812<SPI> where
SPI: FullDuplex<u8, Error = E>,
[src]
SPI: FullDuplex<u8, Error = E>,
type Error = E
type Color = RGB8
pub fn write<T, I>(&mut self, iterator: T) -> Result<(), E> where
T: Iterator<Item = I>,
I: Into<Self::Color>,
[src]
T: Iterator<Item = I>,
I: Into<Self::Color>,
Write all the items of an iterator to a ws2812 strip
impl<SPI, E> SmartLedsWrite for Ws2812<SPI, Sk6812w> where
SPI: FullDuplex<u8, Error = E>,
[src]
SPI: FullDuplex<u8, Error = E>,
Auto Trait Implementations
impl<SPI, DEVICE> Send for Ws2812<SPI, DEVICE> where
DEVICE: Send,
SPI: Send,
DEVICE: Send,
SPI: Send,
impl<SPI, DEVICE> Sync for Ws2812<SPI, DEVICE> where
DEVICE: Sync,
SPI: Sync,
DEVICE: Sync,
SPI: Sync,
impl<SPI, DEVICE> Unpin for Ws2812<SPI, DEVICE> where
DEVICE: Unpin,
SPI: Unpin,
DEVICE: Unpin,
SPI: Unpin,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,