feat(01-01): LED driver — dual strip initialization and output
- 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
This commit is contained in:
18
firmware/src/led_driver.h
Normal file
18
firmware/src/led_driver.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#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);
|
||||
Reference in New Issue
Block a user