aboutsummaryrefslogtreecommitdiffstats
path: root/src/neopix.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/neopix.c')
-rw-r--r--src/neopix.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/neopix.c b/src/neopix.c
deleted file mode 100644
index 028f01c..0000000
--- a/src/neopix.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#include "neopix.h"
-#include "ws2812.pio.h"
-#include "util.h"
-
-#include "hardware/pio.h"
-
-void
-neopix_init(struct neopix *pix, uint pin)
-{
- uint offset;
- int sm;
-
- pix->pio = pio0;
- sm = pio_claim_unused_sm(pix->pio, true);
- ASSERT(sm >= 0);
- pix->sm = (uint) sm;
- pix->pin = pin;
- offset = pio_add_program(pix->pio, &ws2812_program);
- ws2812_program_init(pix->pio, pix->sm, offset,
- pix->pin, 800000, false);
- pix->init = true;
-}
-
-void
-neopix_put(struct neopix *pix, uint32_t rgb) {
- pio_sm_put_blocking(pix->pio, pix->sm, rgb << 8u);
-}