Skip to content

Conversation

@bobdoah
Copy link
Contributor

@bobdoah bobdoah commented Oct 29, 2025

This adds support for setting a color order when using the Pio::Ws2812 lib. I am using a WS2812 strip that uses RGB color order instead of the more typical GRB order, and this felt like a nice addition.

The default GRB usage remains identical and the example in examples/rp235x/src/bin/pio_ws2812.rs works unchanged. To use with a specified color order, you need to use a type annotation:

let program = PioWs2812Program::new(&mut common);
let mut ws2812: PioWs2812<'_, _, 0, 50, Rgb> =
     PioWs2812::with_color_order(&mut common, sm0, p.DMA_CH0, p.PIN_15, &program);

Copy link
Member

@lulf lulf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@lulf lulf added this pull request to the merge queue Nov 4, 2025
Merged via the queue into embassy-rs:main with commit e876838 Nov 4, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants