- led_driver.h declares StripWand (NeoGrbwFeature/RMT) + StripSchrank (NeoWs2801Spi2MhzMethod) - led_driver.cpp implements initStrips, showBothStrips, setAllWand/Schrank, applyBrightness helpers - showBothStrips calls stripWand.Show() first (non-blocking DMA) then stripSchrank.Show() (blocking SPI) - Brightness clamped to [0.0f, BRIGHTNESS_MAX] before scaling
19 lines
637 B
C
19 lines
637 B
C
#pragma once
|
|
#include <NeoPixelBus.h>
|
|
#include "config.h"
|
|
|
|
// SK6812: RGBW (4 bytes/LED) — MUST use NeoGrbwFeature, never NeoRgbFeature
|
|
using StripWand = NeoPixelBus<NeoGrbwFeature, NeoEsp32Rmt0Ws2812xMethod>;
|
|
// WS2801: RGB (3 bytes/LED), 2MHz SPI for cable-safe 5m run
|
|
using StripSchrank = NeoPixelBus<NeoRgbFeature, NeoWs2801Spi2MhzMethod>;
|
|
|
|
extern StripWand stripWand;
|
|
extern StripSchrank stripSchrank;
|
|
|
|
void initStrips();
|
|
void showBothStrips();
|
|
void setAllWand(RgbwColor color);
|
|
void setAllSchrank(RgbColor color);
|
|
RgbwColor applyBrightnessW(RgbwColor c, float factor);
|
|
RgbColor applyBrightnessR(RgbColor c, float factor);
|