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>
This commit is contained in:
33
firmware/ws2812_led.h
Normal file
33
firmware/ws2812_led.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user