ws2812.h (261B)
1 #pragma once 2 3 #include "hardware/pio.h" 4 #include "hardware/gpio.h" 5 6 #include <stdbool.h> 7 8 struct ws2812 { 9 PIO pio; 10 uint sm; 11 uint pin; 12 bool init; 13 }; 14 15 void ws2812_init(struct ws2812 *pix, PIO pio, uint pin); 16 void ws2812_put(struct ws2812 *pix, uint32_t rgb);