pub struct SmartLedsAdapter<'ch, const BUFFER_SIZE: usize, Color = Grb<u8>> { /* private fields */ }Expand description
Adapter taking an RMT channel and a specific pin and providing RGB LED
interaction functionality using the smart-leds crate
Implementations§
Source§impl<'ch, const BUFFER_SIZE: usize> SmartLedsAdapter<'ch, BUFFER_SIZE, Grb<u8>>
impl<'ch, const BUFFER_SIZE: usize> SmartLedsAdapter<'ch, BUFFER_SIZE, Grb<u8>>
Sourcepub fn new<C, O>(
channel: C,
pin: O,
rmt_buffer: &'ch mut [PulseCode; BUFFER_SIZE],
) -> Self
pub fn new<C, O>( channel: C, pin: O, rmt_buffer: &'ch mut [PulseCode; BUFFER_SIZE], ) -> Self
Create a new adapter object that drives the pin using the RMT channel.
Source§impl<'ch, const BUFFER_SIZE: usize, Color> SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: ComponentSlice<u8>,
impl<'ch, const BUFFER_SIZE: usize, Color> SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: ComponentSlice<u8>,
Sourcepub fn new_with_color<C, O>(
channel: C,
pin: O,
rmt_buffer: &'ch mut [PulseCode; BUFFER_SIZE],
) -> SmartLedsAdapter<'ch, BUFFER_SIZE, Color>
pub fn new_with_color<C, O>( channel: C, pin: O, rmt_buffer: &'ch mut [PulseCode; BUFFER_SIZE], ) -> SmartLedsAdapter<'ch, BUFFER_SIZE, Color>
Create a new adapter object that drives the pin using the RMT channel.
Trait Implementations§
Source§impl<'ch, const BUFFER_SIZE: usize, Color> SmartLedsWrite for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: ComponentSlice<u8>,
impl<'ch, const BUFFER_SIZE: usize, Color> SmartLedsWrite for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: ComponentSlice<u8>,
Auto Trait Implementations§
impl<'ch, const BUFFER_SIZE: usize, Color = Grb<u8>> !UnwindSafe for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>
impl<'ch, const BUFFER_SIZE: usize, Color> Freeze for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>
impl<'ch, const BUFFER_SIZE: usize, Color> RefUnwindSafe for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: RefUnwindSafe,
impl<'ch, const BUFFER_SIZE: usize, Color> Send for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: Send,
impl<'ch, const BUFFER_SIZE: usize, Color> Sync for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: Sync,
impl<'ch, const BUFFER_SIZE: usize, Color> Unpin for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>where
Color: Unpin,
impl<'ch, const BUFFER_SIZE: usize, Color> UnsafeUnpin for SmartLedsAdapter<'ch, BUFFER_SIZE, Color>
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