LED clock
 All Files Functions Variables Macros Groups Pages
Macros | Functions
led_ws2812b.h File Reference

library to drive a WS2812b LED chain (API) More...

Go to the source code of this file.

Macros

#define WS2812B_LEDS   48
 

Functions

void ws2812b_setup (void)
 setup WS2812b LED driver
 
void ws2812b_set_rgb (uint16_t led, uint8_t red, uint8_t green, uint8_t blue)
 set color of a single LED More...
 
void ws2812b_transmit (void)
 transmit color values to WS2812b LEDs
 

Detailed Description

library to drive a WS2812b LED chain (API)

Author
King Kévin kingk.nosp@m.evin.nosp@m.@cuvo.nosp@m.odoo.nosp@m..info
Date
2016
Note
peripherals used: SPI SPI peripheral used to control the WS2812b LEDs, timer timer peripheral used to generate SPI clock, DMA DMA peripheral used to send the data

Definition in file led_ws2812b.h.

Macro Definition Documentation

#define WS2812B_LEDS   48

number of LEDs on the WS2812b strip

Definition at line 24 of file led_ws2812b.h.

Function Documentation

void ws2812b_set_rgb ( uint16_t  led,
uint8_t  red,
uint8_t  green,
uint8_t  blue 
)

set color of a single LED

Parameters
[in]ledthe LED number to set the color
[in]redthe red color value to set on the LED
[in]greenthe green color value to set on the LED
[in]bluethe blue color value to set on the LED
Note
transmission needs to be done separately

Definition at line 81 of file led_ws2812b.c.