|
|
|
|
|
|
|
|
|
|
|
|
|
|
class WS2812Serial { |
|
|
class WS2812Serial { |
|
|
public: |
|
|
public: |
|
|
constexpr WS2812Serial(uint16_t num, void *fb, void *db, uint8_t pin, uint8_t cfg) : |
|
|
|
|
|
|
|
|
constexpr WS2812Serial(uint16_t num, void *fb, void *db, uint8_t pin, uint8_t cfg, DMAChannel* dma_chan=nullptr) : |
|
|
numled(num), pin(pin), config(cfg), |
|
|
numled(num), pin(pin), config(cfg), |
|
|
frameBuffer((uint8_t *)fb), drawBuffer((uint8_t *)db) { |
|
|
|
|
|
|
|
|
frameBuffer((uint8_t *)fb), drawBuffer((uint8_t *)db), dma(dma_chan) { |
|
|
} |
|
|
} |
|
|
bool begin(); |
|
|
bool begin(); |
|
|
void setPixel(uint32_t num, uint32_t color) { |
|
|
void setPixel(uint32_t num, uint32_t color) { |