mirror of https://github.com/arendst/Tasmota.git
Add define USE_WS2812_BTYPE to select different bitbang timing
Add define USE_WS2812_BTYPE to select different bitbang timing (#6292)
This commit is contained in:
parent
a2e250f008
commit
48783a4772
|
@ -487,6 +487,7 @@
|
||||||
// ------------------------------------------------
|
// ------------------------------------------------
|
||||||
|
|
||||||
#define USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by //
|
#define USE_WS2812 // WS2812 Led string using library NeoPixelBus (+5k code, +1k mem, 232 iram) - Disable by //
|
||||||
|
#define USE_WS2812_BTYPE NEO_BB_DEFAULT // BitBang type (NEO_BB_DEFAULT, NEO_BB_WS2812X, NEO_BB_SK6812)
|
||||||
#define USE_WS2812_CTYPE NEO_GRB // WS2812 Color type (NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_RGBW, NEO_GRBW)
|
#define USE_WS2812_CTYPE NEO_GRB // WS2812 Color type (NEO_RGB, NEO_GRB, NEO_BRG, NEO_RBG, NEO_RGBW, NEO_GRBW)
|
||||||
// #define USE_WS2812_DMA // DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow
|
// #define USE_WS2812_DMA // DMA supports only GPIO03 (= Serial RXD) (+1k mem). When USE_WS2812_DMA is enabled expect Exceptions on Pow
|
||||||
|
|
||||||
|
|
|
@ -172,6 +172,10 @@ const uint32_t LOOP_SLEEP_DELAY = 50; // Lowest number of milliseconds to
|
||||||
#define RGB_REMAP_BRGW 48
|
#define RGB_REMAP_BRGW 48
|
||||||
#define RGB_REMAP_BGRW 54
|
#define RGB_REMAP_BGRW 54
|
||||||
|
|
||||||
|
#define NEO_BB_DEFAULT 0 // NeoPixelBus BitBang speed 800kBps with reset time 50 uSec
|
||||||
|
#define NEO_BB_WS2812X 1 // NeoPixelBus BitBang speed 800kBps with reset time 300 uSec
|
||||||
|
#define NEO_BB_SK6812 2 // NeoPixelBus BitBang speed 800kBps with reset time 80 uSec
|
||||||
|
|
||||||
#define MQTT_PUBSUBCLIENT 1 // Mqtt PubSubClient library
|
#define MQTT_PUBSUBCLIENT 1 // Mqtt PubSubClient library
|
||||||
#define MQTT_TASMOTAMQTT 2 // Mqtt TasmotaMqtt library based on esp-mqtt-arduino - soon obsolete
|
#define MQTT_TASMOTAMQTT 2 // Mqtt TasmotaMqtt library based on esp-mqtt-arduino - soon obsolete
|
||||||
#define MQTT_ESPMQTTARDUINO 3 // Mqtt esp-mqtt-arduino library by Ingo Randolf - obsolete but define is present for debugging purposes
|
#define MQTT_ESPMQTTARDUINO 3 // Mqtt esp-mqtt-arduino library by Ingo Randolf - obsolete but define is present for debugging purposes
|
||||||
|
|
|
@ -39,11 +39,17 @@
|
||||||
typedef NeoRgbFeature selectedNeoFeatureType;
|
typedef NeoRgbFeature selectedNeoFeatureType;
|
||||||
#endif // USE_WS2812_CTYPE
|
#endif // USE_WS2812_CTYPE
|
||||||
|
|
||||||
|
|
||||||
#ifdef USE_WS2812_DMA
|
#ifdef USE_WS2812_DMA
|
||||||
typedef Neo800KbpsMethod selectedNeoSpeedType;
|
typedef Neo800KbpsMethod selectedNeoSpeedType;
|
||||||
#else // USE_WS2812_DMA
|
#else // USE_WS2812_DMA
|
||||||
|
// See NeoEspBitBangMethod.h for available options
|
||||||
|
#if (USE_WS2812_BTYPE == NEO_BB_WS2812X)
|
||||||
|
typedef NeoEsp8266BitBangWs2812xMethod selectedNeoSpeedType;
|
||||||
|
#elif (USE_WS2812_BTYPE == NEO_BB_SK6812)
|
||||||
|
typedef NeoEsp8266BitBangSk6812Method selectedNeoSpeedType;
|
||||||
|
#else // USE_WS2812_BTYPE
|
||||||
typedef NeoEsp8266BitBang800KbpsMethod selectedNeoSpeedType;
|
typedef NeoEsp8266BitBang800KbpsMethod selectedNeoSpeedType;
|
||||||
|
#endif // USE_WS2812_BTYPE
|
||||||
#endif // USE_WS2812_DMA
|
#endif // USE_WS2812_DMA
|
||||||
NeoPixelBus<selectedNeoFeatureType, selectedNeoSpeedType> *strip = nullptr;
|
NeoPixelBus<selectedNeoFeatureType, selectedNeoSpeedType> *strip = nullptr;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue