Browse Source

allow passing DMAChannel in ctor

enables pre-alloc/pre-config
main_ledos
John Robinson 3 years ago
parent
commit
abb1c87600
No known key found for this signature in database
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      WS2812Serial.h

+ 2
- 2
WS2812Serial.h View File

@@ -61,9 +61,9 @@

class WS2812Serial {
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),
frameBuffer((uint8_t *)fb), drawBuffer((uint8_t *)db) {
frameBuffer((uint8_t *)fb), drawBuffer((uint8_t *)db), dma(dma_chan) {
}
bool begin();
void setPixel(uint32_t num, uint32_t color) {

Loading…
Cancel
Save