pub struct RgbwPioWs2812<'d, P: Instance, const S: usize, ORDER>where
ORDER: RgbwColorOrder,{ /* private fields */ }Expand description
Pio backed RGBW ws2812 driver This version is intended for ws2812 leds with 4 addressable lights Const N is the number of ws2812 leds attached to this pin
Implementations§
Source§impl<'d, P: Instance, const S: usize> RgbwPioWs2812<'d, P, S, Grbw>
impl<'d, P: Instance, const S: usize> RgbwPioWs2812<'d, P, S, Grbw>
Sourcepub fn new<D: ChannelInstance>(
pio: &mut Common<'d, P>,
sm: StateMachine<'d, P, S>,
pin: Peri<'d, impl PioPin>,
dma: Peri<'d, D>,
irq: impl Binding<D::Interrupt, InterruptHandler<D>> + 'd,
program: &PioWs2812Program<'d, P>,
) -> Self
pub fn new<D: ChannelInstance>( pio: &mut Common<'d, P>, sm: StateMachine<'d, P, S>, pin: Peri<'d, impl PioPin>, dma: Peri<'d, D>, irq: impl Binding<D::Interrupt, InterruptHandler<D>> + 'd, program: &PioWs2812Program<'d, P>, ) -> Self
Configure a pio state machine to use the loaded ws2812 program. Uses the default GRBW color order
Source§impl<'d, P: Instance, const S: usize, ORDER> RgbwPioWs2812<'d, P, S, ORDER>where
ORDER: RgbwColorOrder,
impl<'d, P: Instance, const S: usize, ORDER> RgbwPioWs2812<'d, P, S, ORDER>where
ORDER: RgbwColorOrder,
Sourcepub fn with_color_order<D: ChannelInstance>(
pio: &mut Common<'d, P>,
sm: StateMachine<'d, P, S>,
pin: Peri<'d, impl PioPin>,
dma: Peri<'d, D>,
irq: impl Binding<D::Interrupt, InterruptHandler<D>> + 'd,
program: &PioWs2812Program<'d, P>,
) -> Self
pub fn with_color_order<D: ChannelInstance>( pio: &mut Common<'d, P>, sm: StateMachine<'d, P, S>, pin: Peri<'d, impl PioPin>, dma: Peri<'d, D>, irq: impl Binding<D::Interrupt, InterruptHandler<D>> + 'd, program: &PioWs2812Program<'d, P>, ) -> Self
Configure a pio state machine to use the loaded ws2812 program. Uses the specified color order
Trait Implementations§
Source§impl<'d, P: Instance, const S: usize, ORDER: RgbwColorOrder> SmartLedsWriteAsync for RgbwPioWs2812<'d, P, S, ORDER>
impl<'d, P: Instance, const S: usize, ORDER: RgbwColorOrder> SmartLedsWriteAsync for RgbwPioWs2812<'d, P, S, ORDER>
Auto Trait Implementations§
impl<'d, P, const S: usize, ORDER> !UnwindSafe for RgbwPioWs2812<'d, P, S, ORDER>
impl<'d, P, const S: usize, ORDER> Freeze for RgbwPioWs2812<'d, P, S, ORDER>
impl<'d, P, const S: usize, ORDER> RefUnwindSafe for RgbwPioWs2812<'d, P, S, ORDER>
impl<'d, P, const S: usize, ORDER> Send for RgbwPioWs2812<'d, P, S, ORDER>
impl<'d, P, const S: usize, ORDER> Sync for RgbwPioWs2812<'d, P, S, ORDER>
impl<'d, P, const S: usize, ORDER> Unpin for RgbwPioWs2812<'d, P, S, ORDER>
impl<'d, P, const S: usize, ORDER> UnsafeUnpin for RgbwPioWs2812<'d, P, S, ORDER>
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