57 #ifdef WS2812_TARGET_PLATFORM_AVR
58 #ifdef _WS2812_TARGET_PLATFORM_DEFINED
59 #error "Multiple target platforms defined!"
61 #define _WS2812_TARGET_PLATFORM_DEFINED
65 #ifdef WS2812_TARGET_PLATFORM_ARDUINO_AVR
66 #ifdef _WS2812_TARGET_PLATFORM_DEFINED
67 #error "Multiple target platforms defined!"
69 #define _WS2812_TARGET_PLATFORM_DEFINED
73 #ifdef WS2812_TARGET_PLATFORM_STM8S
74 #ifdef _WS2812_TARGET_PLATFORM_DEFINED
75 #error "Multiple target platforms defined!"
77 #define _WS2812_TARGET_PLATFORM_DEFINED
81 #ifndef _WS2812_TARGET_PLATFORM_DEFINED
82 #error "No target platform defined!"
ALL PLATFORMS: Data structure to configure a WS2812 device struct.
Data structure to hold RGB color values.
ALL PLATFORMS: WS2812 device struct to drive one or more WS2812 devices.
void ws2812_close_tx(ws2812 *dev)
Closes a WS2812 transmission.
void ws2812_wait_rst(ws2812 *dev)
Waits for the WS2812 device to reset.
uint8_t ws2812_config(ws2812 *dev, ws2812_cfg *cfg)
Configures a WS2812 device struct.
void ws2812_prep_tx(ws2812 *dev)
Prepares the host device for data transmission.
void _ws2812_get_rgbmap(uint8_t(*rgbmap)[3], ws2812_order order)
Initializes a rgb map for a given color order.
void ws2812_tx(ws2812 *dev, ws2812_rgb *pxls, size_t n_pxls)
Transmits RGB values to the provided WS2812 device.
Provides AVR platform specific definitions.
Definitions required by all platform specific headers.
ws2812_order
Enum to specify the WS2812 device's color order.
Provides STM8S platform specific definitions.