You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
862 B
35 lines
862 B
#ifndef WS2812_H
|
|
#define WS2812_H
|
|
|
|
#include "platform.h"
|
|
|
|
/**
|
|
* Load RGBs from a packed byte stream
|
|
*
|
|
* @param port
|
|
* @param ll_pin
|
|
* @param rgbs - packed R,G,B, R,G,B, ... array
|
|
* @param count - number of pixels (triplets)
|
|
*/
|
|
void ws2812_load_raw(GPIO_TypeDef *port, uint32_t ll_pin, const uint8_t *rgbs, uint32_t count);
|
|
|
|
/**
|
|
* Load all pixels with BLACK (0,0,0)
|
|
*
|
|
* @param port
|
|
* @param ll_pin
|
|
* @param count - number of pixels
|
|
*/
|
|
void ws2812_clear(GPIO_TypeDef *port, uint32_t ll_pin, uint32_t count);
|
|
|
|
/**
|
|
* Load from a stream of 32-bit numbers (4th or 1st byte skipped)
|
|
* @param port
|
|
* @param ll_pin
|
|
* @param rgbs - payload
|
|
* @param count - number of pixels
|
|
* @param bigendian - big endian ordering
|
|
*/
|
|
void ws2812_load_sparse(GPIO_TypeDef *port, uint32_t ll_pin, const uint8_t *rgbs, uint32_t count, bool bigendian);
|
|
|
|
#endif //WS2812_H
|
|
|