aboutsummaryrefslogtreecommitdiffstats
path: root/src/ws2812.h
blob: 95ba4f23cdd4bda3b36b1dc00bd99e6eae52644a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include "hardware/pio.h"
#include "hardware/gpio.h"

#include <stdbool.h>

struct ws2812 {
	PIO pio;
	uint sm;
	uint pin;
	bool init;
};

void ws2812_init(struct ws2812 *pix, PIO pio, uint pin);
void ws2812_put(struct ws2812 *pix, uint32_t rgb);