Skip to content

Commit cfe398e

Browse files
put_pixel sets the color order for the pixel to BRG instead of the required GRB (#626)
1 parent d2346dd commit cfe398e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pio/ws2812/ws2812_parallel.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ static uint8_t *current_strip_out;
2929
static bool current_strip_4color;
3030

3131
static inline void put_pixel(uint32_t pixel_grb) {
32-
*current_strip_out++ = pixel_grb & 0xffu;
33-
*current_strip_out++ = (pixel_grb >> 8u) & 0xffu;
3432
*current_strip_out++ = (pixel_grb >> 16u) & 0xffu;
33+
*current_strip_out++ = (pixel_grb >> 8u) & 0xffu;
34+
*current_strip_out++ = pixel_grb & 0xffu;
3535
if (current_strip_4color) {
36-
*current_strip_out++ = 0; // todo adjust?
36+
*current_strip_out++ = 0; // todo adjust?
3737
}
3838
}
3939

4040
static inline uint32_t urgb_u32(uint8_t r, uint8_t g, uint8_t b) {
41-
return
41+
return
4242
((uint32_t) (r) << 8) |
4343
((uint32_t) (g) << 16) |
4444
(uint32_t) (b);

0 commit comments

Comments
 (0)