aboutsummaryrefslogtreecommitdiffstats
path: root/src/neopix.h
diff options
context:
space:
mode:
authorLouis Burda <quent.burda@gmail.com>2022-12-02 16:06:32 +0100
committerLouis Burda <quent.burda@gmail.com>2022-12-02 17:18:16 +0100
commit0392766bc379448c907de2bce45d6b57621d95b5 (patch)
treeb87705bfb60a6569769b3c0125a910144c784436 /src/neopix.h
parent6defee37f9939991bbf3152e2cd4e18593baa541 (diff)
downloadsxkbd-0392766bc379448c907de2bce45d6b57621d95b5.tar.gz
sxkbd-0392766bc379448c907de2bce45d6b57621d95b5.zip
Added split uart support based on chibios impl
Diffstat (limited to 'src/neopix.h')
-rw-r--r--src/neopix.h27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/neopix.h b/src/neopix.h
deleted file mode 100644
index 0245373..0000000
--- a/src/neopix.h
+++ /dev/null
@@ -1,27 +0,0 @@
-#pragma once
-
-#include "hardware/pio.h"
-#include "hardware/gpio.h"
-
-#include <stdbool.h>
-
-struct neopix {
- PIO pio;
- uint sm;
- uint pin;
- bool init;
-};
-
-void neopix_init(struct neopix *pix, uint pin);
-void neopix_put(struct neopix *pix, uint32_t rgb);
-
-inline uint32_t
-neopix_u32rgb(uint8_t r, uint8_t g, uint8_t b) {
- uint32_t rgb;
-
- rgb = ((uint32_t) r) << 8;
- rgb |= ((uint32_t) g) << 16;
- rgb |= ((uint32_t) b) << 0;
-
- return rgb;
-}