|
FastLED 3.9.15
|
ezWS2812 GPIO driver for WS2812 LEDs
This driver uses direct GPIO manipulation with precise timing to generate WS2812 signals. Optimized for 39MHz and 78MHz CPUs.
Hardware Requirements:
Usage:
Definition at line 173 of file ezWS2812.h.
#include <ezWS2812.h>
Public Member Functions | |
| ezWS2812gpio (uint16_t num_leds, uint8_t pin) | |
| Constructor. | |
| void | begin () |
| Initialize GPIO pin. | |
| void | end () |
| End communication. | |
| void | end_transfer () |
| Complete LED data transfer. | |
| void | set_all (uint8_t red, uint8_t green, uint8_t blue) |
| Set all LEDs to the same color. | |
| void | set_brightness (uint8_t brightness) |
| Set brightness (0-100%) | |
| void | set_pixel (uint8_t red, uint8_t green, uint8_t blue, uint16_t count=1) |
| Set color for specific number of LEDs. | |
Private Member Functions | |
| void | send_bit (bool bit_value) const |
| Send a single bit using precise timing. | |
| void | send_byte (uint8_t byte_value) const |
| Send a byte (8 bits) with MSB first. | |
Private Attributes | |
| uint8_t | brightness_ |
| uint16_t | num_leds_ |
| uint8_t | pin_ |
| uint32_t | pin_mask_ |
| volatile uint32_t * | port_clear_ |
| volatile uint32_t * | port_set_ |