Files
led-driver-8/firmware/ws2812_led.h
Jimmy f7beac2095 Replace MicroPython runtime with Pico C + W5500 firmware.
Ship UDP RGB panel firmware (eight WS2812 strips) and drop the ESP32 Wi-Fi/MicroPython stack.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-01 21:52:52 +12:00

34 lines
875 B
C

#ifndef WS2812_LED_H
#define WS2812_LED_H
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifndef MAX_STRIPS
#define MAX_STRIPS 8
#endif
/* Create strip slots (none active until ws2812_set_pin). max_leds = capacity each. */
void ws2812_init(unsigned int max_leds);
/* Bind strip to gpio (creates/rebinds PIO SM). strip = 0 … MAX_STRIPS-1. */
int ws2812_set_pin(unsigned int strip, unsigned int pin);
/* Free PIO SM + GPIO so another strip can take the pin. */
void ws2812_release_strip(unsigned int strip);
unsigned int ws2812_get_pin(unsigned int strip);
int ws2812_strip_active(unsigned int strip);
void ws2812_set_rgb(unsigned int strip, const uint8_t *rgb, unsigned int count);
void ws2812_fill(unsigned int strip, uint8_t r, uint8_t g, uint8_t b);
void ws2812_show(unsigned int strip);
void ws2812_show_all(void);
#ifdef __cplusplus
}
#endif
#endif