// WS2812 driver – wraps Adafruit NeoPixel (bit-bang, no SERCOM needed) #include "ws2812.h" #include static Adafruit_NeoPixel s_strip(WS2812_COUNT, WS2812_PIN, NEO_GRB + NEO_KHZ800); void ws2812_init() { s_strip.begin(); s_strip.clear(); s_strip.show(); } void ws2812_set(uint8_t idx, uint8_t r, uint8_t g, uint8_t b) { if (idx >= WS2812_COUNT) return; s_strip.setPixelColor(idx, r, g, b); } void ws2812_fill(uint8_t r, uint8_t g, uint8_t b) { s_strip.fill(s_strip.Color(r, g, b)); } void ws2812_show() { s_strip.show(); } void ws2812_clear() { s_strip.clear(); s_strip.show(); }