Skip to content

Conversation

@Nashenas88
Copy link

Adds direct support for RGBW color via smart_leds::RGBA8, and allows clients to implement custom support via new ColorFormat trait.

Adds direct support for RGBW color via smart_leds::RGBA8, and
allows clients to implement custom support via new ColorFormat trait.
}
}

impl ColorFormat for smart_leds_trait::RGBA<u8> {
Copy link
Member

Choose a reason for hiding this comment

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

No other smart_leds implementation uses RGBA8 to represent an RGBW LED array.
Did you look at other implementations before choosing this abstraction?

/// let pins = rp2040_hal::gpio::pin::bank0::Pins::new(...);
///
/// let (mut pio, sm0, _, _, _) = pac.PIO0.split(&mut pac.RESETS);
/// let mut ws = Ws2812Direct::<_, _, _, smart_leds::RGBA8>::new(
Copy link
Member

Choose a reason for hiding this comment

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

Can you use multiple constructors (one for ws2812, one for sk6812rgbw) instead of requiring users to spell out the generics, please?
This is definitely a step backwards in terms of ergonomics for this API.

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