src/third_party/ezws2812/README.md
This directory contains the ezWS2812 driver from Silicon Labs, adapted for use with FastLED.
Based on the Silicon Labs ezWS2812 library version 2.2.0 by Tamas Jozsi.
Provides optimized WS2812 LED control for Silicon Labs EFR32MG24 series microcontrollers, including:
#define FASTLED_USES_EZWS2812_SPI#include <FastLED.h>
CRGB leds[NUM_LEDS];
void setup() {
// GPIO-based controller on pin 7
FastLED.addLeds<EZWS2812_GPIO, 7, GRB>(leds, NUM_LEDS);
}
// IMPORTANT: Define this BEFORE including FastLED.h
#define FASTLED_USES_EZWS2812_SPI
#include <FastLED.h>
CRGB leds[NUM_LEDS];
void setup() {
// SPI-based controller (uses hardware SPI)
FastLED.addLeds<EZWS2812_SPI, GRB>(leds, NUM_LEDS);
}
The SPI controller consumes a hardware SPI peripheral, which may be needed for other purposes in your project (SD cards, displays, sensors, etc.). Following the same pattern as ObjectFLED for Teensy, the SPI controller must be explicitly enabled to prevent accidentally consuming the SPI peripheral.
FASTLED_USES_EZWS2812_SPI - Enables SPI-based WS2812 controller for MG24 chips
#include <FastLED.h>EZWS2812_SPI template aliasMIT License (see ezWS2812.h for full text) Copyright (c) 2024 Silicon Laboratories Inc.