aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main.c5
-rw-r--r--src/ws2812b.c2
2 files changed, 2 insertions, 5 deletions
diff --git a/src/main.c b/src/main.c
index ac5da83..2bbd0b3 100644
--- a/src/main.c
+++ b/src/main.c
@@ -210,9 +210,7 @@ int main(void)
size_t n = sizeof(buf);
struct ws2812b_buf ws_buf;
make_wsb2812b(&ws_buf, buf, n);
- ws_buf.byte_order = BYTE_ORDER_GBR;
-
- printf("Test %u", byte_scale(40, 0x80));
+ ws_buf.byte_order = BYTE_ORDER_RGB;
rgb_t color;
uint32_t time = 0;
@@ -228,7 +226,6 @@ int main(void)
time++;
GPIO_PORT.out.set(GPIO_PORT_B, ON, 7);
- // printf("WS_BUF: %p, %zu\n", ws_buf.buf, ws_buf.cur);
for (int i = 0; i < N_DMA_XFER; ++i) {
wait_for_dma();
start_dma(&ws_buf);
diff --git a/src/ws2812b.c b/src/ws2812b.c
index 3721b23..1dea9f1 100644
--- a/src/ws2812b.c
+++ b/src/ws2812b.c
@@ -32,7 +32,7 @@
inline static void complie_color_inline(
rgb_t color, struct rgb_compiled* out, enum ws2812b_byte_order byte_order)
{
- if (byte_order == BYTE_ORDER_GBR) {
+ if (byte_order == BYTE_ORDER_GRB) {
uint8_t tmp = color.r;
color.r = color.g;
color.g = tmp;