Skip to content

ws2812 fixes #610

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

ws2812 fixes #610

wants to merge 3 commits into from

Conversation

balika011
Copy link

No description provided.

`pixel_grb << 8u` in `put_pixel` would shift out the `w` and set white to green, green to to red, red to blue and blue to 0.
@@ -123,7 +144,11 @@ int main() {
bool success = pio_claim_free_sm_and_add_program_for_gpio_range(&ws2812_program, &pio, &sm, &offset, WS2812_PIN, 1, true);
hard_assert(success);

#if IS_800KHz
ws2812_program_init(pio, sm, offset, WS2812_PIN, 800000, IS_RGBW);
Copy link
Contributor

Choose a reason for hiding this comment

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

Perhaps it makes more sense to add e.g. #define WS2812_FREQUENCY 800000 and then pass that to ws2812_program_init, rather than adding a #if IS_800KHz section?

@@ -17,15 +17,19 @@
* Take into consideration if your WS2812 is a RGB or RGBW variant.
*
* If it is RGBW, you need to set IS_RGBW to true and provide 4 bytes per
* pixel (Red, Green, Blue, White) and use urgbw_u32().
* pixel (Red, Green, Blue, White) and use urgb_u32() or urgbw_u32().
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't tell why you've effectively removed support for urgbw_u32() ?

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