Merge pull request #12330 from Jason2866/Neopixel

update Neopixel to v.2.6.3.
This commit is contained in:
Theo Arends 2021-06-10 08:41:39 +02:00 committed by GitHub
commit 9e37ccf26a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
129 changed files with 1808 additions and 205 deletions

View File

@ -1,19 +0,0 @@
{
"name": "NeoPixelBus",
"keywords": "NeoPixel, WS2811, WS2812, WS2813, SK6812, DotStar, APA102, SK9822, APA106, LPD8806, P9813, WS2801 RGB, RGBW",
"description": "A library that makes controlling NeoPixels (APA106, WS2811, WS2812, WS2813 & SK6812) and DotStars (APA102, LPD8806, SK9822, WS2801, P9813) easy. Supports most Arduino platforms, including async hardware support for Esp8266, Esp32, and Nrf52 (Nano 33 BLE). Support for RGBW pixels. Includes seperate RgbColor, RgbwColor, HslColor, and HsbColor objects. Includes an animator class that helps create asyncronous animations. For Esp8266 it has three methods of sending NeoPixel data, DMA, UART, and Bit Bang. For Esp32 it has two base methods of sending NeoPixel data, i2s and RMT. For all platforms, there are two methods of sending DotStar data, hardware SPI and software SPI.",
"homepage": "https://github.com/Makuna/NeoPixelBus/wiki",
"repository": {
"type": "git",
"url": "https://github.com/Makuna/NeoPixelBus"
},
"version": "2.6.1",
"frameworks": "arduino",
"platforms": "*",
"dependencies": [
{
"name": "SPI"
}
]
}

View File

@ -1,9 +0,0 @@
name=NeoPixelBus by Makuna
version=2.6.1
author=Michael C. Miller (makuna@live.com)
maintainer=Michael C. Miller (makuna@live.com)
sentence=A library that makes controlling NeoPixels (APA106, WS2811, WS2812, WS2813 & SK6812) and DotStars (APA102, LPD8806, SK9822, WS2801, P9813) easy.
paragraph=Supports most Arduino platforms, including async hardware support for Esp8266, Esp32, and Nrf52 (Nano 33 BLE). Support for RGBW pixels. Includes seperate RgbColor, RgbwColor, HslColor, and HsbColor objects. Includes an animator class that helps create asyncronous animations. Supports Matrix layout of pixels. Includes Gamma corretion object. For Esp8266 it has three methods of sending NeoPixel data, DMA, UART, and Bit Bang. For Esp32 it has two base methods of sending NeoPixel data, i2s and RMT. For all platforms, there are two methods of sending DotStar data, hardware SPI and software SPI.
category=Display
url=https://github.com/Makuna/NeoPixelBus/wiki
architectures=*

View File

@ -24,7 +24,7 @@ See [Why this Library in the Wiki](https://github.com/Makuna/NeoPixelBus/wiki/Li
## Documentation
[See Wiki](https://github.com/Makuna/NeoPixelBus/wiki)
## Installing This Library (prefered, you just want to use it)
## Installing This Library (preferred, you just want to use it)
Open the Library Manager and search for "NeoPixelBus by Makuna" and install
## Installing This Library From GitHub (advanced, you want to contribute)

View File

@ -0,0 +1,159 @@
// DotStarTest_Esp32Advanced - This example only works on the ESP32
// This example will cycle between showing four pixels as Red, Green, Blue, White
// and then showing those pixels as Black. This example uses Hardware SPI on the ESP32
// with options to use alternate pins for SPI and drive two SPI ports using the alternate
// additional SPI hardware available on the ESP32.
//
// There is serial output of the current state so you can confirm and follow along
//
#include <NeoPixelBus.h>
#define USE_DEFAULT_SPI_PORT 1
#define USE_ALTERNATE_SPI_PORT 1
#if (USE_DEFAULT_SPI_PORT == 1)
const uint16_t PixelCount = 4; // this example assumes 4 pixels, making it smaller will cause a failure
// It's usually better to use alternate pins. If set to false, strip will use GPIO 18 for Clock, GPIO 23 for Data, and pin 5 will output a chip select signal
const bool useSpiAlternatePins = true;
// If you set useSpiAlternatePins true, then these pins will be used instead. Any output-capable GPIO can be used.
const uint8_t DotClockPin = 18;
const uint8_t DotDataPin = 23;
const int8_t DotChipSelectPin = -1; // -1 means the chip select signal won't be output, freeing up one pin compared to useSpiAlternatePins=false
// for software bit bang (only use if neither SPI peripheral is available)
//NeoPixelBus<DotStarBgrFeature, DotStarMethod> strip(PixelCount, DotClockPin, DotDataPin);
// for hardware SPI (best performance) with default SPI peripheral
NeoPixelBus<DotStarBgrFeature, DotStarSpiMethod> strip(PixelCount);
// DotStarSpiMethod defaults to 10MHz clock speed. For other speeds, replace "DotStarSpiMethod" with another method specifying speed, e.g. "DotStarSpi2MhzMethod" (see wiki for more details)
// to change the SPI clock speed during runtime, use the "Hz" clock setting, e.g. DotStarSpiHzMethod, which default to 10MHz but supports updating during runtime
//NeoPixelBus<DotStarBgrFeature, DotStarSpiHzMethod> strip(PixelCount);
//#define SET_CLOCK_SPEED_DURING_RUNTIME // only define if using "Hz" clock method
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
const uint16_t PixelCount2 = 4; // this example assumes 4 pixels, making it smaller will cause a failure
// It's usually better to use alternate pins. If set to false, strip2 will use GPIO 14 for Clock, GPIO 13 for Data, and pin 15 will output a chip select signal
const bool useSpiAlternatePins2 = true;
// If you set useSpiAlternatePins2 true, then these pins will be used instead. Any output-capable GPIO can be used.
const uint8_t DotClockPin2 = 14;
const uint8_t DotDataPin2 = 13;
const int8_t DotChipSelectPin2 = -1; // -1 means the chip select signal won't be output, freeing up one pin compared to useSpiAlternatePins2=false
// for hardware SPI (best performance) with alternate SPI peripheral
NeoPixelBus<DotStarBgrFeature, DotStarHspiMethod> strip2(PixelCount2);
// DotStarHspiMethod defaults to 10MHz clock speed. For other speeds, replace "DotStarSpiMethod" with another method specifying speed, e.g. "DotStarHspi2MhzMethod" (see wiki for more details)
#endif
#define colorSaturation 128
// Note that both DotStarSpiMethod and DotStarHspiMethod can be used with DotStarLbgrFeature and DotStarWbgrFeature but to keep things simple those are excluded from this example, see DotStarTest for more details
RgbColor red(colorSaturation, 0, 0);
RgbColor green(0, colorSaturation, 0);
RgbColor blue(0, 0, colorSaturation);
RgbColor white(colorSaturation);
RgbColor black(0);
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for serial attach
Serial.println();
Serial.println("Initializing...");
Serial.flush();
#if (USE_DEFAULT_SPI_PORT == 1)
if (useSpiAlternatePins)
{
strip.Begin(DotClockPin, DotDataPin, DotDataPin, DotChipSelectPin);
}
else
{
strip.Begin();
}
strip.ClearTo(black); // this resets all the DotStars to an off state
strip.Show();
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
if (useSpiAlternatePins2)
{
strip2.Begin(DotClockPin2, DotDataPin2, DotDataPin2, DotChipSelectPin2);
}
else
{
strip2.Begin();
}
strip2.ClearTo(black); // this resets all the DotStars to an off state
strip2.Show();
#endif
Serial.println();
Serial.println("Running...");
}
void loop()
{
delay(5000);
#if (USE_DEFAULT_SPI_PORT == 1)
Serial.println("Default SPI Colors R, G, B, W...");
// set the colors,
strip.SetPixelColor(0, red);
strip.SetPixelColor(1, green);
strip.SetPixelColor(2, blue);
strip.SetPixelColor(3, white);
strip.Show();
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
Serial.println("Alt SPI Colors W, B, G, R...");
// set the colors,
strip2.SetPixelColor(0, white);
strip2.SetPixelColor(1, blue);
strip2.SetPixelColor(2, green);
strip2.SetPixelColor(3, red);
strip2.Show();
#endif
delay(5000);
Serial.println("Off ...");
#if (USE_DEFAULT_SPI_PORT == 1)
#ifdef SET_CLOCK_SPEED_DURING_RUNTIME
uint32_t clockspeed = 5000000UL;
strip.SetMethodSettings(NeoSpiSettings(clockspeed));
#endif
// turn off the pixels
strip.SetPixelColor(0, black);
strip.SetPixelColor(1, black);
strip.SetPixelColor(2, black);
strip.SetPixelColor(3, black);
strip.Show();
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
// turn off the pixels
strip2.SetPixelColor(0, black);
strip2.SetPixelColor(1, black);
strip2.SetPixelColor(2, black);
strip2.SetPixelColor(3, black);
strip2.Show();
#endif
}

View File

@ -0,0 +1,148 @@
// DotStarTest_Esp32Advanced - This example only works on the ESP32
// This example will cycle between showing four pixels as Red, Green, Blue, White
// and then showing those pixels as Black. This example uses DMA to drive Hardware SPI on the ESP32
// with options to use alternate pins for SPI and drive two SPI ports
//
// There is serial output of the current state so you can confirm and follow along
//
#include <NeoPixelBus.h>
#define USE_DEFAULT_SPI_PORT 1
#define USE_ALTERNATE_SPI_PORT 1
#if (USE_DEFAULT_SPI_PORT == 1)
const uint16_t PixelCount = 4; // this example assumes 4 pixels, making it smaller will cause a failure
// It's usually better to use alternate pins. If set to false, strip will use GPIO 18 for Clock, GPIO 23 for Data, and pin 5 will output a chip select signal
const bool useSpiAlternatePins = true;
// If you set useSpiAlternatePins true, then these pins will be used instead. Any output-capable GPIO can be used.
const uint8_t DotClockPin = 18;
const uint8_t DotDataPin = 23;
const int8_t DotChipSelectPin = -1; // -1 means the chip select signal won't be output, freeing up one pin compared to useSpiAlternatePins=false
// for software bit bang (only use if neither SPI peripheral is available)
//NeoPixelBus<DotStarBgrFeature, DotStarMethod> strip(PixelCount, DotClockPin, DotDataPin);
// for hardware SPI (best performance) with default SPI peripheral
NeoPixelBus<DotStarBgrFeature, DotStarEsp32DmaVspiMethod> strip(PixelCount);
// DotStarEsp32DmaVspiMethod defaults to 10MHz clock speed. For other speeds, replace "DotStarSpiMethod" with another method specifying speed, e.g. "DotStarSpi2MhzMethod" (see wiki for more details)
// See DotStarTest_Esp32Advanced example for how to set clock speed at runtime
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
const uint16_t PixelCount2 = 4; // this example assumes 4 pixels, making it smaller will cause a failure
// It's usually better to use alternate pins. If set to false, strip2 will use GPIO 14 for Clock, GPIO 13 for Data, and pin 15 will output a chip select signal
const bool useSpiAlternatePins2 = true;
// If you set useSpiAlternatePins2 true, then these pins will be used instead. Any output-capable GPIO can be used.
const uint8_t DotClockPin2 = 14;
const uint8_t DotDataPin2 = 13;
const int8_t DotChipSelectPin2 = -1; // -1 means the chip select signal won't be output, freeing up one pin compared to useSpiAlternatePins2=false
// for hardware SPI (best performance) with alternate SPI peripheral
NeoPixelBus<DotStarBgrFeature, DotStarEsp32DmaHspiMethod> strip2(PixelCount2);
// DotStarEsp32DmaHspiMethod defaults to 10MHz clock speed. For other speeds, replace "DotStarSpiMethod" with another method specifying speed, e.g. "DotStarHspi2MhzMethod" (see wiki for more details)
#endif
#define colorSaturation 128
// Note that both DotStarEsp32DmaVspiMethod and DotStarEsp32DmaHspiMethod can be used with DotStarLbgrFeature and DotStarWbgrFeature but to keep things simple those are excluded from this example, see DotStarTest for more details
RgbColor red(colorSaturation, 0, 0);
RgbColor green(0, colorSaturation, 0);
RgbColor blue(0, 0, colorSaturation);
RgbColor white(colorSaturation);
RgbColor black(0);
void setup()
{
Serial.begin(115200);
while (!Serial); // wait for serial attach
Serial.println();
Serial.println("Initializing...");
Serial.flush();
#if (USE_DEFAULT_SPI_PORT == 1)
if (useSpiAlternatePins)
{
strip.Begin(DotClockPin, DotDataPin, DotDataPin, DotChipSelectPin);
}
else
{
strip.Begin();
}
strip.ClearTo(black); // this resets all the DotStars to an off state
strip.Show();
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
if (useSpiAlternatePins2)
{
strip2.Begin(DotClockPin2, DotDataPin2, DotDataPin2, DotChipSelectPin2);
}
else
{
strip2.Begin();
}
strip2.ClearTo(black); // this resets all the DotStars to an off state
strip2.Show();
#endif
Serial.println();
Serial.println("Running...");
}
void loop()
{
delay(500);
#if (USE_DEFAULT_SPI_PORT == 1)
Serial.println("Default SPI Colors R, G, B, W...");
// set the colors,
strip.SetPixelColor(0, red);
strip.SetPixelColor(1, green);
strip.SetPixelColor(2, blue);
strip.SetPixelColor(3, white);
strip.Show();
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
Serial.println("Alt SPI Colors W, B, G, R...");
// set the colors,
strip2.SetPixelColor(0, white);
strip2.SetPixelColor(1, blue);
strip2.SetPixelColor(2, green);
strip2.SetPixelColor(3, red);
strip2.Show();
#endif
delay(500);
Serial.println("Off ...");
#if (USE_DEFAULT_SPI_PORT == 1)
// turn off the pixels
strip.SetPixelColor(0, black);
strip.SetPixelColor(1, black);
strip.SetPixelColor(2, black);
strip.SetPixelColor(3, black);
strip.Show();
#endif
#if (USE_ALTERNATE_SPI_PORT == 1)
// turn off the pixels
strip2.SetPixelColor(0, black);
strip2.SetPixelColor(1, black);
strip2.SetPixelColor(2, black);
strip2.SetPixelColor(3, black);
strip2.Show();
#endif
}

View File

@ -30,7 +30,7 @@ void loop()
{
delay(2000);
strip.RotateLeft(1);
strip.RotateRight(1); // reads right to left, so it is reversed
strip.Show();
}

View File

@ -32,7 +32,7 @@ NeoPixelAnimator animations(Animation_COUNT);
void CycleAnimation(const AnimationParam& param)
{
// calculate which segment should be on using the animation progress
uint8_t bitfield = 1 << (uint8_t)(param.progress * LedSegment_F);
uint8_t bitfield = 1 << ( static_cast<uint8_t>(param.progress * LedSegment_G) % LedSegment_G);
// instant a digit with that segment on
SevenSegDigit digit(bitfield, brightness);
// apply it to the strip
@ -126,7 +126,7 @@ void loop()
brightness);
// start the seconds fade animation
animations.StartAnimation(Animation_Fade, 1000, FadeAnimation);
animations.StartAnimation(Animation_Fade, 500, FadeAnimation);
// start the cycle animation for the next second
animations.StartAnimation(Animation_Cycle, 1000, CycleAnimation);

View File

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 44 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 42 KiB

View File

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -17,6 +17,7 @@ HsbColor KEYWORD1
HtmlColor KEYWORD1
NeoNoSettings KEYWORD1
NeoTm1814Settings KEYWORD1
NeoSpiSettings KEYWORD1
NeoGrbFeature KEYWORD1
NeoGrbwFeature KEYWORD1
NeoRgbwFeature KEYWORD1
@ -42,6 +43,8 @@ NeoWs2812Method KEYWORD1
NeoWs2811Method KEYWORD1
NeoSk6812Method KEYWORD1
NeoTm1814Method KEYWORD1
NeoTm1829Method KEYWORD1
NeoTx1812Method KEYWORD1
NeoLc8812Method KEYWORD1
NeoApa106Method KEYWORD1
Neo800KbpsInvertedMethod KEYWORD1
@ -52,17 +55,21 @@ NeoWs2812InvertedMethod KEYWORD1
NeoWs2811InvertedMethod KEYWORD1
NeoSk6812InvertedMethod KEYWORD1
NeoTm1814InvertedMethod KEYWORD1
NeoTm1829InvertedMethod KEYWORD1
NeoTx1812InvertedMethod KEYWORD1
NeoLc8812InvertedMethod KEYWORD1
NeoApa106InvertedMethod KEYWORD1
NeoEsp8266DmaWs2812xMethod KEYWORD1
NeoEsp8266DmaSk6812Method KEYWORD1
NeoEsp8266DmaTm1814Method KEYWORD1
NeoEsp8266DmaTm1829Method KEYWORD1
NeoEsp8266DmaApa106Method KEYWORD1
NeoEsp8266Dma800KbpsMethod KEYWORD1
NeoEsp8266Dma400KbpsMethod KEYWORD1
NeoEsp8266DmaInvertedWs2812xMethod KEYWORD1
NeoEsp8266DmaInvertedSk6812Method KEYWORD1
NeoEsp8266DmaInvertedTm1814Method KEYWORD1
NeoEsp8266DmaInvertedTm1829Method KEYWORD1
NeoEsp8266DmaInvertedApa106Method KEYWORD1
NeoEsp8266DmaInverted800KbpsMethod KEYWORD1
NeoEsp8266DmaInverted400KbpsMethod KEYWORD1
@ -72,6 +79,7 @@ NeoEsp8266Uart0Ws2812Method KEYWORD1
NeoEsp8266Uart0Ws2811Method KEYWORD1
NeoEsp8266Uart0Sk6812Method KEYWORD1
NeoEsp8266Uart0Tm1814Method KEYWORD1
NeoEsp8266Uart0Tm1829Method KEYWORD1
NeoEsp8266Uart0Lc8812Method KEYWORD1
NeoEsp8266Uart0Apa106Method KEYWORD1
NeoEsp8266Uart0800KbpsMethod KEYWORD1
@ -82,6 +90,7 @@ NeoEsp8266AsyncUart0Ws2812Method KEYWORD1
NeoEsp8266AsyncUart0Ws2811Method KEYWORD1
NeoEsp8266AsyncUart0Sk6812Method KEYWORD1
NeoEsp8266AsyncUart0Tm1814Method KEYWORD1
NeoEsp8266AsyncUart0Tm1829Method KEYWORD1
NeoEsp8266AsyncUart0Lc8812Method KEYWORD1
NeoEsp8266AsyncUart0Apa106Method KEYWORD1
NeoEsp8266AsyncUart0800KbpsMethod KEYWORD1
@ -92,6 +101,7 @@ NeoEsp8266Uart1Ws2812Method KEYWORD1
NeoEsp8266Uart1Ws2811Method KEYWORD1
NeoEsp8266Uart1Sk6812Method KEYWORD1
NeoEsp8266Uart1Tm1814 KEYWORD1
NeoEsp8266Uart1Tm1829 KEYWORD1
NeoEsp8266Uart1Lc8812Method KEYWORD1
NeoEsp8266Uart1Apa106Method KEYWORD1
NeoEsp8266Uart1800KbpsMethod KEYWORD1
@ -102,6 +112,7 @@ NeoEsp8266AsyncUart1Ws2812Method KEYWORD1
NeoEsp8266AsyncUart1Ws2811Method KEYWORD1
NeoEsp8266AsyncUart1Sk6812Method KEYWORD1
NeoEsp8266AsyncUart1Tm1814 KEYWORD1
NeoEsp8266AsyncUart1Tm1829 KEYWORD1
NeoEsp8266AsyncUart1Lc8812Method KEYWORD1
NeoEsp8266AsyncUart1Apa106Method KEYWORD1
NeoEsp8266AsyncUart1800KbpsMethod KEYWORD1
@ -112,6 +123,7 @@ NeoEsp8266Uart0Ws2812InvertedMethod KEYWORD1
NeoEsp8266Uart0Ws2811InvertedMethod KEYWORD1
NeoEsp8266Uart0Sk6812InvertedMethod KEYWORD1
NeoEsp8266Uart0Tm1814InvertedMethod KEYWORD1
NeoEsp8266Uart0Tm1829InvertedMethod KEYWORD1
NeoEsp8266Uart0Lc8812InvertedMethod KEYWORD1
NeoEsp8266Uart0Apa106InvertedMethod KEYWORD1
NeoEsp8266Uart0800KbpsInvertedMethod KEYWORD1
@ -122,6 +134,7 @@ NeoEsp8266AsyncUart0Ws2812InvertedMethod KEYWORD1
NeoEsp8266AsyncUart0Ws2811InvertedMethod KEYWORD1
NeoEsp8266AsyncUart0Sk6812InvertedMethod KEYWORD1
NeoEsp8266AsyncUart0Tm1814InvertedMethod KEYWORD1
NeoEsp8266AsyncUart0Tm1829InvertedMethod KEYWORD1
NeoEsp8266AsyncUart0Lc8812InvertedMethod KEYWORD1
NeoEsp8266AsyncUart0Apa106InvertedMethod KEYWORD1
NeoEsp8266AsyncUart0800KbpsInvertedMethod KEYWORD1
@ -132,6 +145,7 @@ NeoEsp8266Uart1Ws2812InvertedMethod KEYWORD1
NeoEsp8266Uart1Ws2811InvertedMethod KEYWORD1
NeoEsp8266Uart1Sk6812InvertedMethod KEYWORD1
NeoEsp8266Uart1Tm1814InvertedMethod KEYWORD1
NeoEsp8266Uart1Tm1829InvertedMethod KEYWORD1
NeoEsp8266Uart1Lc8812InvertedMethod KEYWORD1
NeoEsp8266Uart1Apa106InvertedMethod KEYWORD1
NeoEsp8266Uart1800KbpsInvertedMethod KEYWORD1
@ -142,6 +156,7 @@ NeoEsp8266AsyncUart1Ws2812InvertedMethod KEYWORD1
NeoEsp8266AsyncUart1Ws2811InvertedMethod KEYWORD1
NeoEsp8266AsyncUart1Sk6812InvertedMethod KEYWORD1
NeoEsp8266AsyncUart1Tm1814InvertedMethod KEYWORD1
NeoEsp8266AsyncUart1Tm1829InvertedMethod KEYWORD1
NeoEsp8266AsyncUart1Lc8812InvertedMethod KEYWORD1
NeoEsp8266AsyncUart1Apa106InvertedMethod KEYWORD1
NeoEsp8266AsyncUart1800KbpsInvertedMethod KEYWORD1
@ -152,6 +167,7 @@ NeoEsp8266BitBangWs2812Method KEYWORD1
NeoEsp8266BitBangWs2811Method KEYWORD1
NeoEsp8266BitBangSk6812Method KEYWORD1
NeoEsp8266BitBangTm1814Method KEYWORD1
NeoEsp8266BitBangTm1829Method KEYWORD1
NeoEsp8266BitBangLc8812Method KEYWORD1
NeoEsp8266BitBangApa106Method KEYWORD1
NeoEsp8266BitBang800KbpsMethod KEYWORD1
@ -162,6 +178,7 @@ NeoEsp8266BitBangWs2812InvertedMethod KEYWORD1
NeoEsp8266BitBangWs2811InvertedMethod KEYWORD1
NeoEsp8266BitBangSk6812InvertedMethod KEYWORD1
NeoEsp8266BitBangTm1814InvertedMethod KEYWORD1
NeoEsp8266BitBangTm1829InvertedMethod KEYWORD1
NeoEsp8266BitBangLc8812InvertedMethod KEYWORD1
NeoEsp8266BitBangApa106InvertedMethod KEYWORD1
NeoEsp8266BitBang800KbpsInvertedMethod KEYWORD1
@ -175,12 +192,14 @@ NeoEsp32I2sNApa106Method KEYWORD1
NeoEsp32I2s0Ws2812xMethod KEYWORD1
NeoEsp32I2s0Sk6812Method KEYWORD1
NeoEsp32I2s0Tm1814Method KEYWORD1
NeoEsp32I2s0Tm1829Method KEYWORD1
NeoEsp32I2s0800KbpsMethod KEYWORD1
NeoEsp32I2s0400KbpsMethod KEYWORD1
NeoEsp32I2s0Apa106Method KEYWORD1
NeoEsp32I2s1Ws2812xMethod KEYWORD1
NeoEsp32I2s1Sk6812Method KEYWORD1
NeoEsp32I2s1Tm1814Method KEYWORD1
NeoEsp32I2s1Tm1829Method KEYWORD1
NeoEsp32I2s1800KbpsMethod KEYWORD1
NeoEsp32I2s1400KbpsMethod KEYWORD1
NeoEsp32I2s1Apa106Method KEYWORD1
@ -193,12 +212,14 @@ NeoEsp32I2sNApa106InvertedMethod KEYWORD1
NeoEsp32I2s0Ws2812xInvertedMethod KEYWORD1
NeoEsp32I2s0Sk6812InvertedMethod KEYWORD1
NeoEsp32I2s0Tm1814InvertedMethod KEYWORD1
NeoEsp32I2s0Tm1829InvertedMethod KEYWORD1
NeoEsp32I2s0800KbpsInvertedMethod KEYWORD1
NeoEsp32I2s0400KbpsInvertedMethod KEYWORD1
NeoEsp32I2s0Apa106InvertedMethod KEYWORD1
NeoEsp32I2s1Ws2812xInvertedMethod KEYWORD1
NeoEsp32I2s1Sk6812InvertedMethod KEYWORD1
NeoEsp32I2s1Tm1814InvertedMethod KEYWORD1
NeoEsp32I2s1Tm1829InvertedMethod KEYWORD1
NeoEsp32I2s1800KbpsInvertedMethod KEYWORD1
NeoEsp32I2s1400KbpsInvertedMethod KEYWORD1
NeoEsp32I2s1Apa106InvertedMethod KEYWORD1
@ -213,6 +234,7 @@ NeoEsp32Rmt0Ws2811Method KEYWORD1
NeoEsp32Rmt0Ws2812xMethod KEYWORD1
NeoEsp32Rmt0Sk6812Method KEYWORD1
NeoEsp32Rmt0Tm1814Method KEYWORD1
NeoEsp32Rmt0Tm1829Method KEYWORD1
NeoEsp32Rmt0Apa106Method KEYWORD1
NeoEsp32Rmt0800KbpsMethod KEYWORD1
NeoEsp32Rmt0400KbpsMethod KEYWORD1
@ -220,6 +242,7 @@ NeoEsp32Rmt1Ws2811Method KEYWORD1
NeoEsp32Rmt1Ws2812xMethod KEYWORD1
NeoEsp32Rmt1Sk6812Method KEYWORD1
NeoEsp32Rmt1Tm1814Method KEYWORD1
NeoEsp32Rmt1Tm1814Method KEYWORD1
NeoEsp32Rmt1Apa106Method KEYWORD1
NeoEsp32Rmt1800KbpsMethod KEYWORD1
NeoEsp32Rmt1400KbpsMethod KEYWORD1
@ -227,6 +250,7 @@ NeoEsp32Rmt2Ws2811Method KEYWORD1
NeoEsp32Rmt2Ws2812xMethod KEYWORD1
NeoEsp32Rmt2Sk6812Method KEYWORD1
NeoEsp32Rmt2Tm1814Method KEYWORD1
NeoEsp32Rmt2Tm1829Method KEYWORD1
NeoEsp32Rmt2Apa106Method KEYWORD1
NeoEsp32Rmt2800KbpsMethod KEYWORD1
NeoEsp32Rmt2400KbpsMethod KEYWORD1
@ -234,6 +258,7 @@ NeoEsp32Rmt3Ws2811Method KEYWORD1
NeoEsp32Rmt3Ws2812xMethod KEYWORD1
NeoEsp32Rmt3Sk6812Method KEYWORD1
NeoEsp32Rmt3Tm1814Method KEYWORD1
NeoEsp32Rmt3Tm1829Method KEYWORD1
NeoEsp32Rmt3Apa106Method KEYWORD1
NeoEsp32Rmt3800KbpsMethod KEYWORD1
NeoEsp32Rmt3400KbpsMethod KEYWORD1
@ -241,6 +266,7 @@ NeoEsp32Rmt4Ws2811Method KEYWORD1
NeoEsp32Rmt4Ws2812xMethod KEYWORD1
NeoEsp32Rmt4Sk6812Method KEYWORD1
NeoEsp32Rmt4Tm1814Method KEYWORD1
NeoEsp32Rmt4Tm1829Method KEYWORD1
NeoEsp32Rmt4Apa106Method KEYWORD1
NeoEsp32Rmt4800KbpsMethod KEYWORD1
NeoEsp32Rmt4400KbpsMethod KEYWORD1
@ -248,6 +274,7 @@ NeoEsp32Rmt5Ws2811Method KEYWORD1
NeoEsp32Rmt5Ws2812xMethod KEYWORD1
NeoEsp32Rmt5Sk6812Method KEYWORD1
NeoEsp32Rmt5Tm1814Method KEYWORD1
NeoEsp32Rmt5Tm1829Method KEYWORD1
NeoEsp32Rmt5Apa106Method KEYWORD1
NeoEsp32Rmt5800KbpsMethod KEYWORD1
NeoEsp32Rmt5400KbpsMethod KEYWORD1
@ -255,6 +282,7 @@ NeoEsp32Rmt6Ws2811Method KEYWORD1
NeoEsp32Rmt6Ws2812xMethod KEYWORD1
NeoEsp32Rmt6Sk6812Method KEYWORD1
NeoEsp32Rmt6Tm1814Method KEYWORD1
NeoEsp32Rmt6Tm1829Method KEYWORD1
NeoEsp32Rmt6Apa106Method KEYWORD1
NeoEsp32Rmt6800KbpsMethod KEYWORD1
NeoEsp32Rmt6400KbpsMethod KEYWORD1
@ -262,6 +290,7 @@ NeoEsp32Rmt7Ws2811Method KEYWORD1
NeoEsp32Rmt7Ws2812xMethod KEYWORD1
NeoEsp32Rmt7Sk6812Method KEYWORD1
NeoEsp32Rmt7Tm1814Method KEYWORD1
NeoEsp32Rmt7Tm1829Method KEYWORD1
NeoEsp32Rmt7Apa106Method KEYWORD1
NeoEsp32Rmt7800KbpsMethod KEYWORD1
NeoEsp32Rmt7400KbpsMethod KEYWORD1
@ -276,6 +305,7 @@ NeoEsp32Rmt0Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt0Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt0Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt0Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt0Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt0Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt0800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt0400KbpsInvertedMethod KEYWORD1
@ -283,6 +313,7 @@ NeoEsp32Rmt1Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt1Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt1Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt1Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt1Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt1Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt1800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt1400KbpsInvertedMethod KEYWORD1
@ -290,6 +321,7 @@ NeoEsp32Rmt2Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt2Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt2Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt2Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt2Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt2Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt2800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt2400KbpsInvertedMethod KEYWORD1
@ -297,6 +329,7 @@ NeoEsp32Rmt3Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt3Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt3Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt3Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt3Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt3Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt3800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt3400KbpsInvertedMethod KEYWORD1
@ -304,6 +337,7 @@ NeoEsp32Rmt4Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt4Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt4Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt4Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt4Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt4Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt4800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt4400KbpsInvertedMethod KEYWORD1
@ -311,6 +345,7 @@ NeoEsp32Rmt5Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt5Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt5Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt5Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt5Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt5Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt5800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt5400KbpsInvertedMethod KEYWORD1
@ -318,6 +353,7 @@ NeoEsp32Rmt6Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt6Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt6Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt6Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt6Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt6Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt6800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt6400KbpsInvertedMethod KEYWORD1
@ -325,6 +361,7 @@ NeoEsp32Rmt7Ws2811InvertedMethod KEYWORD1
NeoEsp32Rmt7Ws2812xInvertedMethod KEYWORD1
NeoEsp32Rmt7Sk6812InvertedMethod KEYWORD1
NeoEsp32Rmt7Tm1814InvertedMethod KEYWORD1
NeoEsp32Rmt7Tm1829InvertedMethod KEYWORD1
NeoEsp32Rmt7Apa106InvertedMethod KEYWORD1
NeoEsp32Rmt7800KbpsInvertedMethod KEYWORD1
NeoEsp32Rmt7400KbpsInvertedMethod KEYWORD1
@ -334,6 +371,7 @@ NeoEsp32BitBangWs2812Method KEYWORD1
NeoEsp32BitBangWs2811Method KEYWORD1
NeoEsp32BitBangSk6812Method KEYWORD1
NeoEsp32BitBangTm1814Method KEYWORD1
NeoEsp32BitBangTm1829Method KEYWORD1
NeoEsp32BitBangLc8812Method KEYWORD1
NeoEsp32BitBangApa106Method KEYWORD1
NeoEsp32BitBang800KbpsMethod KEYWORD1
@ -344,6 +382,7 @@ NeoEsp32BitBangWs2812InvertedMethod KEYWORD1
NeoEsp32BitBangWs2811InvertedMethod KEYWORD1
NeoEsp32BitBangSk6812InvertedMethod KEYWORD1
NeoEsp32BitBangTm1814InvertedMethod KEYWORD1
NeoEsp32BitBangTm1829InvertedMethod KEYWORD1
NeoEsp32BitBangLc8812InvertedMethod KEYWORD1
NeoEsp32BitBangApa106InvertedMethod KEYWORD1
NeoEsp32BitBang800KbpsInvertedMethod KEYWORD1
@ -351,60 +390,80 @@ NeoEsp32BitBang400KbpsInvertedMethod KEYWORD1
NeoNrf52xPwmNWs2812xMethod KEYWORD1
NeoNrf52xPwmNSk6812Method KEYWORD1
NeoNrf52xPwmNTm1814Method KEYWORD1
NeoNrf52xPwmNTm1829Method KEYWORD1
NeoNrf52xPwmNTx1812Method KEYWORD1
NeoNrf52xPwmN800KbpsMethod KEYWORD1
NeoNrf52xPwmN400KbpsMethod KEYWORD1
NeoNrf52xPwmNApa106Method KEYWORD1
NeoNrf52xPwm0Ws2812xMethod KEYWORD1
NeoNrf52xPwm0Sk6812Method KEYWORD1
NeoNrf52xPwm0Tm1814Method KEYWORD1
NeoNrf52xPwm0Tm1829Method KEYWORD1
NeoNrf52xPwm0Tx1812Method KEYWORD1
NeoNrf52xPwm0800KbpsMethod KEYWORD1
NeoNrf52xPwm0400KbpsMethod KEYWORD1
NeoNrf52xPwm0Apa106Method KEYWORD1
NeoNrf52xPwm1Ws2812xMethod KEYWORD1
NeoNrf52xPwm1Sk6812Method KEYWORD1
NeoNrf52xPwm1Tm1814Method KEYWORD1
NeoNrf52xPwm1Tm1829Method KEYWORD1
NeoNrf52xPwm1Tx1812Method KEYWORD1
NeoNrf52xPwm1800KbpsMethod KEYWORD1
NeoNrf52xPwm1400KbpsMethod KEYWORD1
NeoNrf52xPwm1Apa106Method KEYWORD1
NeoNrf52xPwm2Ws2812xMethod KEYWORD1
NeoNrf52xPwm2Sk6812Method KEYWORD1
NeoNrf52xPwm2Tm1814Method KEYWORD1
NeoNrf52xPwm2Tm1829Method KEYWORD1
NeoNrf52xPwm2Tx1812Method KEYWORD1
NeoNrf52xPwm2800KbpsMethod KEYWORD1
NeoNrf52xPwm2400KbpsMethod KEYWORD1
NeoNrf52xPwm2Apa106Method KEYWORD1
NeoNrf52xPwm3Ws2812xMethod KEYWORD1
NeoNrf52xPwm3Sk6812Method KEYWORD1
NeoNrf52xPwm3Tm1814Method KEYWORD1
NeoNrf52xPwm3Tm1829Method KEYWORD1
NeoNrf52xPwm3Tx1812Method KEYWORD1
NeoNrf52xPwm3800KbpsMethod KEYWORD1
NeoNrf52xPwm3400KbpsMethod KEYWORD1
NeoNrf52xPwm3Apa106Method KEYWORD1
NeoNrf52xPwmNWs2812xInvertedMethod KEYWORD1
NeoNrf52xPwmNSk6812InvertedMethod KEYWORD1
NeoNrf52xPwmNTm1814InvertedMethod KEYWORD1
NeoNrf52xPwmNTm1829InvertedMethod KEYWORD1
NeoNrf52xPwmNTx1812InvertedMethod KEYWORD1
NeoNrf52xPwmN800KbpsInvertedMethod KEYWORD1
NeoNrf52xPwmN400KbpsInvertedMethod KEYWORD1
NeoNrf52xPwmNApa106InvertedMethod KEYWORD1
NeoNrf52xPwm0Ws2812xInvertedMethod KEYWORD1
NeoNrf52xPwm0Sk6812InvertedMethod KEYWORD1
NeoNrf52xPwm0Tm1814InvertedMethod KEYWORD1
NeoNrf52xPwm0Tm1829InvertedMethod KEYWORD1
NeoNrf52xPwm0Tx1812InvertedMethod KEYWORD1
NeoNrf52xPwm0800KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm0400KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm0Apa106InvertedMethod KEYWORD1
NeoNrf52xPwm1Ws2812xInvertedMethod KEYWORD1
NeoNrf52xPwm1Sk6812InvertedMethod KEYWORD1
NeoNrf52xPwm1Tm1814InvertedMethod KEYWORD1
NeoNrf52xPwm1Tm1829InvertedMethod KEYWORD1
NeoNrf52xPwm1Tx1812InvertedMethod KEYWORD1
NeoNrf52xPwm1800KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm1400KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm1Apa106InvertedMethod KEYWORD1
NeoNrf52xPwm2Ws2812xInvertedMethod KEYWORD1
NeoNrf52xPwm2Sk6812InvertedMethod KEYWORD1
NeoNrf52xPwm2Tm1814InvertedMethod KEYWORD1
NeoNrf52xPwm2Tm1829InvertedMethod KEYWORD1
NeoNrf52xPwm2Tx1812InvertedMethod KEYWORD1
NeoNrf52xPwm2800KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm2400KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm2Apa106InvertedMethod KEYWORD1
NeoNrf52xPwm3Ws2812xInvertedMethod KEYWORD1
NeoNrf52xPwm3Sk6812InvertedMethod KEYWORD1
NeoNrf52xPwm3Tm1814InvertedMethod KEYWORD1
NeoNrf52xPwm3Tm1829InvertedMethod KEYWORD1
NeoNrf52xPwm3Tx1812InvertedMethod KEYWORD1
NeoNrf52xPwm3800KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm3400KbpsInvertedMethod KEYWORD1
NeoNrf52xPwm3Apa106InvertedMethod KEYWORD1
@ -415,6 +474,7 @@ DotStarSpi10MhzMethod KEYWORD1
DotStarSpi2MhzMethod KEYWORD1
DotStarSpi1MhzMethod KEYWORD1
DotStarSpi500KhzMethod KEYWORD1
DotStarSpiHzMethod KEYWORD1
NeoWs2801Method KEYWORD1
NeoWs2801SpiMethod KEYWORD1
NeoWs2801Spi20MhzMethod KEYWORD1
@ -422,6 +482,7 @@ NeoWs2801Spi10MhzMethod KEYWORD1
NeoWs2801Spi2MhzMethod KEYWORD1
NeoWs2801Spi1MhzMethod KEYWORD1
NeoWs2801Spi500KhzMethod KEYWORD1
NeoWs2801SpiHzMethod KEYWORD1
Lpd6803SpiMethod KEYWORD1
Lpd6803Method KEYWORD1
Lpd6803Spi20MhzMethod KEYWORD1
@ -429,6 +490,7 @@ Lpd6803Spi10MhzMethod KEYWORD1
Lpd6803Spi2MhzMethod KEYWORD1
Lpd6803Spi1MhzMethod KEYWORD1
Lpd6803Spi500KhzMethod KEYWORD1
Lpd6803SpiHzMethod KEYWORD1
Lpd8806Method KEYWORD1
Lpd8806SpiMethod KEYWORD1
Lpd8806Spi20MhzMethod KEYWORD1
@ -436,6 +498,7 @@ Lpd8806Spi10MhzMethod KEYWORD1
Lpd8806Spi2MhzMethod KEYWORD1
Lpd8806Spi1MhzMethod KEYWORD1
Lpd8806Spi500KhzMethod KEYWORD1
Lpd8806SpiHzMethod KEYWORD1
P9813Method KEYWORD1
P9813SpiMethod KEYWORD1
P9813Spi20MhzMethod KEYWORD1
@ -443,6 +506,7 @@ P9813Spi10MhzMethod KEYWORD1
P9813Spi2MhzMethod KEYWORD1
P9813Spi1MhzMethod KEYWORD1
P9813Spi500KhzMethod KEYWORD1
P9813SpiHzMethod KEYWORD1
NeoPixelAnimator KEYWORD1
AnimUpdateCallback KEYWORD1
AnimationParam KEYWORD1
@ -507,12 +571,14 @@ PixelCount KEYWORD2
SetPixelColor KEYWORD2
GetPixelColor KEYWORD2
SwapPixelColor KEYWORD2
SetString KEYWORD2
CalculateBrightness KEYWORD2
Dim KEYWORD2
Brighten KEYWORD2
Darken KEYWORD2
Lighten KEYWORD2
SetPixelSettings KEYWORD2
SetMethodSettings KEYWORD2
LinearBlend KEYWORD2
BilinearBlend KEYWORD2
IsAnimating KEYWORD2
@ -605,3 +671,4 @@ NeoBusChannel_4 LITERAL1
NeoBusChannel_5 LITERAL1
NeoBusChannel_6 LITERAL1
NeoBusChannel_7 LITERAL1

View File

@ -0,0 +1,19 @@
{
"name": "NeoPixelBus",
"keywords": "NeoPixel, WS2811, WS2812, WS2813, SK6812, DotStar, APA102, SK9822, APA106, LPD8806, LPD6803, P9813, TM1829, TM1814, TX1812, WS2801 RGB, RGBW",
"description": "A library that makes controlling NeoPixels (APA106, WS2811, WS2812, WS2813, SK6812, TM1829, TM1814, TX1812) and DotStars (APA102, LPD8806, LPD6803, SK9822, WS2801, P9813) easy. Supports most Arduino platforms, including async hardware support for Esp8266, Esp32, and Nrf52 (Nano 33 BLE). Support for RGBW pixels and 7 Segment LED direct driven. Includes seperate RgbColor, RgbwColor, Rgb16Color, Rgb48Color, HslColor, and HsbColor objects. Includes an animator class that helps create asyncronous animations. For all platforms; there are two methods of sending DotStar data, hardware SPI and software SPI.",
"homepage": "https://github.com/Makuna/NeoPixelBus/wiki",
"repository": {
"type": "git",
"url": "https://github.com/Makuna/NeoPixelBus"
},
"version": "2.6.3",
"frameworks": "arduino",
"platforms": "*",
"dependencies": [
{
"name": "SPI"
}
]
}

View File

@ -0,0 +1,9 @@
name=NeoPixelBus by Makuna
version=2.6.3
author=Michael C. Miller (makuna@live.com)
maintainer=Michael C. Miller (makuna@live.com)
sentence=A library that makes controlling NeoPixels (APA106, WS2811, WS2812, WS2813, SK6812, TM1829, TM1814, TX1812) and DotStars (APA102, LPD8806, LPD6803, SK9822, WS2801, P9813) easy.
paragraph=Supports most Arduino platforms, including async hardware support for Esp8266, Esp32, and Nrf52 (Nano 33 BLE). Support for RGBW pixels and 7 Segment LED direct driven. Includes seperate RgbColor, RgbwColor, Rgb16Color, Rgb48Color, HslColor, and HsbColor objects. Includes an animator class that helps create asyncronous animations. Supports Matrix layout of pixels. Includes Gamma corretion object. For all platforms; there are two methods of sending DotStar data, hardware SPI and software SPI.
category=Display
url=https://github.com/Makuna/NeoPixelBus/wiki
architectures=*

View File

@ -88,7 +88,7 @@ public:
// Only update if there is a change
if (brightness != _brightness)
{
uint16_t scale = (((uint16_t)brightness + 1) << 8) / ((uint16_t)_brightness + 1);
uint16_t scale = ((static_cast<uint16_t>(brightness) + 1) << 8) / (static_cast<uint16_t>(_brightness) + 1);
// scale existing pixels
//

View File

@ -104,6 +104,7 @@ License along with NeoPixel. If not, see
#include "internal/NeoEsp32I2sMethod.h"
#include "internal/NeoEsp32RmtMethod.h"
#include "internal/NeoEspBitBangMethod.h"
#include "internal/DotStarEsp32DmaSpiMethod.h"
#elif defined(ARDUINO_ARCH_NRF52840) // must be before __arm__
@ -172,13 +173,20 @@ public:
ClearTo(0);
}
// used by DotStartSpiMethod if pins can be configured
// used by DotStarSpiMethod/DotStarEsp32DmaSpiMethod if pins can be configured
void Begin(int8_t sck, int8_t miso, int8_t mosi, int8_t ss)
{
_method.Initialize(sck, miso, mosi, ss);
ClearTo(0);
}
// used by DotStarEsp32DmaSpiMethod if pins can be configured - reordered and extended version supporting quad SPI
void Begin(int8_t sck, int8_t dat0, int8_t dat1, int8_t dat2, int8_t dat3, int8_t ss)
{
_method.Initialize(sck, dat0, dat1, dat2, dat3, ss);
ClearTo(0);
}
void Show(bool maintainBufferConsistency = true)
{
if (!IsDirty())
@ -378,6 +386,12 @@ public:
T_COLOR_FEATURE::applySettings(_method.getData(), settings);
Dirty();
};
void SetMethodSettings(const typename T_METHOD::SettingsObject& settings)
{
_method.applySettings(settings);
Dirty();
};
uint32_t CalcTotalMilliAmpere(const typename T_COLOR_FEATURE::ColorObject::SettingsObject& settings)
{

View File

@ -0,0 +1,356 @@
/*-------------------------------------------------------------------------
NeoPixel library helper functions for DotStars using Esp32, DMA and SPI (APA102).
Written by Michael C. Miller.
DotStarEsp32DmaSpiMethod written by Louis Beaudoin (Pixelvation)
I invest time and resources providing this open source code,
please support me by dontating (see https://github.com/Makuna/NeoPixelBus)
-------------------------------------------------------------------------
This file is part of the Makuna/NeoPixelBus library.
NeoPixelBus is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version.
NeoPixelBus is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with NeoPixel. If not, see
<http://www.gnu.org/licenses/>.
-------------------------------------------------------------------------*/
#pragma once
#include "driver/spi_master.h"
#if defined(CONFIG_IDF_TARGET_ESP32C3)
// HSPI_HOST depreciated in C3
#define HSPI_HOST SPI3_HOST
#endif
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
class Esp32VspiBus
{
public:
const static spi_host_device_t SpiHostDevice = VSPI_HOST;
const static int DmaChannel = 1; // arbitrary assignment, but based on the fact there are only two DMA channels and two available SPI ports, we need to split them somehow
const static int ParallelBits = 1;
};
#endif
class Esp32HspiBus
{
public:
const static spi_host_device_t SpiHostDevice = HSPI_HOST;
const static int DmaChannel = 2; // arbitrary assignment, but based on the fact there are only two DMA channels and two available SPI ports, we need to split them somehow
const static int ParallelBits = 1;
};
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
class Esp32Vspi2BitBus
{
public:
const static spi_host_device_t SpiHostDevice = VSPI_HOST;
const static int DmaChannel = 1; // arbitrary assignment, but based on the fact there are only two DMA channels and two available SPI ports, we need to split them somehow
const static int ParallelBits = 2;
};
#endif
class Esp32Hspi2BitBus
{
public:
const static spi_host_device_t SpiHostDevice = HSPI_HOST;
const static int DmaChannel = 2; // arbitrary assignment, but based on the fact there are only two DMA channels and two available SPI ports, we need to split them somehow
const static int ParallelBits = 2;
};
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
class Esp32Vspi4BitBus
{
public:
const static spi_host_device_t SpiHostDevice = VSPI_HOST;
const static int DmaChannel = 1; // arbitrary assignment, but based on the fact there are only two DMA channels and two available SPI ports, we need to split them somehow
const static int ParallelBits = 4;
};
#endif
class Esp32Hspi4BitBus
{
public:
const static spi_host_device_t SpiHostDevice = HSPI_HOST;
const static int DmaChannel = 2; // arbitrary assignment, but based on the fact there are only two DMA channels and two available SPI ports, we need to split them somehow
const static int ParallelBits = 4;
};
template<typename T_SPISPEED, typename T_SPIBUS> class DotStarEsp32DmaSpiMethod
{
public:
typedef typename T_SPISPEED::SettingsObject SettingsObject;
DotStarEsp32DmaSpiMethod(uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizePixelData(pixelCount * elementSize + settingsSize),
_sizeEndFrame((pixelCount + 15) / 16) // 16 = div 2 (bit for every two pixels) div 8 (bits to bytes)
{
_spiBufferSize = _sizeStartFrame + _sizePixelData + _sizeEndFrame;
// must have a 4 byte aligned buffer for i2s
uint32_t alignment = _spiBufferSize % 4;
if (alignment)
{
_spiBufferSize += 4 - alignment;
}
_data = static_cast<uint8_t*>(malloc(_spiBufferSize));
_dmadata = static_cast<uint8_t*>(heap_caps_malloc(_spiBufferSize, MALLOC_CAP_DMA));
// data cleared later in NeoPixelBus::Begin()
}
// Support constructor specifying pins by ignoring pins
DotStarEsp32DmaSpiMethod(uint8_t, uint8_t, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
DotStarEsp32DmaSpiMethod(pixelCount, elementSize, settingsSize)
{
}
~DotStarEsp32DmaSpiMethod()
{
if (_spiHandle)
{
deinitSpiDevice();
esp_err_t ret = spi_bus_free(T_SPIBUS::SpiHostDevice);
ESP_ERROR_CHECK(ret);
}
free(_data);
free(_dmadata);
_spiHandle = NULL;
}
bool IsReadyToUpdate() const
{
spi_transaction_t t;
spi_transaction_t * tptr = &t;
esp_err_t ret = spi_device_get_trans_result(_spiHandle, &tptr, 0);
// We know the previous transaction completed if we got ESP_OK, and we know there's no transactions queued if tptr is unmodified
return (ret == ESP_OK || tptr == &t);
}
void Initialize(int8_t sck, int8_t dat0, int8_t dat1, int8_t dat2, int8_t dat3, int8_t ss)
{
memset(_data, 0x00, _sizeStartFrame);
memset(_data + _sizeStartFrame + _sizePixelData, 0x00, _spiBufferSize - (_sizeStartFrame + _sizePixelData));
_ssPin = ss;
esp_err_t ret;
spi_bus_config_t buscfg;
memset(&buscfg, 0x00, sizeof(buscfg));
buscfg.miso_io_num = dat1;
buscfg.mosi_io_num = dat0;
buscfg.sclk_io_num = sck;
buscfg.quadwp_io_num = dat2;
buscfg.quadhd_io_num = dat3;
buscfg.max_transfer_sz = _spiBufferSize;
//Initialize the SPI bus
ret = spi_bus_initialize(T_SPIBUS::SpiHostDevice, &buscfg, T_SPIBUS::DmaChannel);
ESP_ERROR_CHECK(ret);
initSpiDevice();
}
void Initialize(int8_t sck, int8_t miso, int8_t mosi, int8_t ss)
{
Initialize(sck, mosi, miso, -1, -1, ss);
}
// If pins aren't specified, initialize bus with just the default SCK and MOSI pins for the SPI peripheral (no SS, no >1-bit pins)
void Initialize()
{
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
if (T_SPIBUS::SpiHostDevice == VSPI_HOST)
{
Initialize(SCK, -1, MOSI, -1, -1, -1);
}
else
{
Initialize(14, -1, 13, -1, -1, -1);
}
#else
Initialize(SCK, -1, MOSI, -1, -1, -1);
#endif
}
void Update(bool)
{
while(!IsReadyToUpdate());
memcpy(_dmadata, _data, _spiBufferSize);
memset(&_spiTransaction, 0, sizeof(spi_transaction_t));
_spiTransaction.length = (_spiBufferSize) * 8; // in bits not bytes!
if (T_SPIBUS::ParallelBits == 1)
{
_spiTransaction.flags = 0;
}
if (T_SPIBUS::ParallelBits == 2)
{
_spiTransaction.flags = SPI_TRANS_MODE_DIO;
}
if (T_SPIBUS::ParallelBits == 4)
{
_spiTransaction.flags = SPI_TRANS_MODE_QIO;
}
_spiTransaction.tx_buffer = _dmadata;
esp_err_t ret = spi_device_queue_trans(_spiHandle, &_spiTransaction, 0); //Transmit!
assert(ret == ESP_OK); //Should have had no issues.
}
uint8_t* getData() const
{
return _data + _sizeStartFrame;
};
size_t getDataSize() const
{
return _sizePixelData;
};
void applySettings(const SettingsObject& settings)
{
_speed.applySettings(settings);
if (_spiHandle)
{
deinitSpiDevice();
initSpiDevice();
}
}
private:
void initSpiDevice()
{
spi_device_interface_config_t devcfg = {};
devcfg.clock_speed_hz = _speed.Clock;
devcfg.mode = 0; //SPI mode 0
devcfg.spics_io_num = _ssPin; //CS pin
devcfg.queue_size = 1;
if (T_SPIBUS::ParallelBits == 1)
{
devcfg.flags = 0;
}
if (T_SPIBUS::ParallelBits >= 2)
{
devcfg.flags = SPI_DEVICE_HALFDUPLEX;
}
//Allocate the LEDs on the SPI bus
esp_err_t ret = spi_bus_add_device(T_SPIBUS::SpiHostDevice, &devcfg, &_spiHandle);
ESP_ERROR_CHECK(ret);
}
void deinitSpiDevice()
{
while(!IsReadyToUpdate());
esp_err_t ret = spi_bus_remove_device(_spiHandle);
ESP_ERROR_CHECK(ret);
}
const size_t _sizeStartFrame = 4;
const size_t _sizePixelData; // Size of '_data' buffer below, minus (_sizeStartFrame + _sizeEndFrame)
const size_t _sizeEndFrame;
size_t _spiBufferSize;
uint8_t* _data; // Holds start/end frames and LED color values
uint8_t* _dmadata; // Holds start/end frames and LED color values
spi_device_handle_t _spiHandle = NULL;
spi_transaction_t _spiTransaction;
T_SPISPEED _speed;
int8_t _ssPin;
};
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// Clock Speed and Default Definitions for DotStarEsp32DmaVspi
typedef DotStarEsp32DmaSpiMethod<SpiSpeed40Mhz, Esp32VspiBus> DotStarEsp32DmaVspi40MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed20Mhz, Esp32VspiBus> DotStarEsp32DmaVspi20MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed10Mhz, Esp32VspiBus> DotStarEsp32DmaVspi10MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed5Mhz, Esp32VspiBus> DotStarEsp32DmaVspi5MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed2Mhz, Esp32VspiBus> DotStarEsp32DmaVspi2MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed1Mhz, Esp32VspiBus> DotStarEsp32DmaVspi1MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed500Khz, Esp32VspiBus> DotStarEsp32DmaVspi500KhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeedHz, Esp32VspiBus> DotStarEsp32DmaVspiHzMethod;
typedef DotStarEsp32DmaVspi10MhzMethod DotStarEsp32DmaVspiMethod;
#endif
// Clock Speed and Default Definitions for DotStarEsp32DmaHspi
typedef DotStarEsp32DmaSpiMethod<SpiSpeed40Mhz, Esp32HspiBus> DotStarEsp32DmaHspi40MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed20Mhz, Esp32HspiBus> DotStarEsp32DmaHspi20MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed10Mhz, Esp32HspiBus> DotStarEsp32DmaHspi10MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed5Mhz, Esp32HspiBus> DotStarEsp32DmaHspi5MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed2Mhz, Esp32HspiBus> DotStarEsp32DmaHspi2MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed1Mhz, Esp32HspiBus> DotStarEsp32DmaHspi1MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed500Khz, Esp32HspiBus> DotStarEsp32DmaHspi500KhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeedHz, Esp32HspiBus> DotStarEsp32DmaHspiHzMethod;
typedef DotStarEsp32DmaHspi10MhzMethod DotStarEsp32DmaHspiMethod;
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// Clock Speed and Default Definitions for DotStarEsp32DmaVspi2Bit
typedef DotStarEsp32DmaSpiMethod<SpiSpeed40Mhz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2Bit40MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed20Mhz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2Bit20MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed10Mhz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2Bit10MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed5Mhz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2Bit5MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed2Mhz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2Bit2MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed1Mhz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2Bit1MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed500Khz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2Bit500KhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeedHz,Esp32Vspi2BitBus> DotStarEsp32DmaVspi2BitHzMethod;
typedef DotStarEsp32DmaVspi2Bit10MhzMethod DotStarEsp32DmaVspi2BitMethod;
#endif
// Clock Speed and Default Definitions for DotStarEsp32DmaHspi2Bit
typedef DotStarEsp32DmaSpiMethod<SpiSpeed40Mhz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2Bit40MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed20Mhz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2Bit20MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed10Mhz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2Bit10MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed5Mhz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2Bit5MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed2Mhz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2Bit2MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed1Mhz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2Bit1MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed500Khz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2Bit500KhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeedHz,Esp32Hspi2BitBus> DotStarEsp32DmaHspi2BitHzMethod;
typedef DotStarEsp32DmaHspi2Bit10MhzMethod DotStarEsp32DmaHspi2BitMethod;
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// Clock Speed and Default Definitions for DotStarEsp32DmaVspi4Bit
typedef DotStarEsp32DmaSpiMethod<SpiSpeed40Mhz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4Bit40MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed20Mhz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4Bit20MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed10Mhz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4Bit10MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed5Mhz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4Bit5MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed2Mhz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4Bit2MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed1Mhz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4Bit1MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed500Khz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4Bit500KhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeedHz,Esp32Vspi4BitBus> DotStarEsp32DmaVspi4BitHzMethod;
typedef DotStarEsp32DmaVspi4Bit10MhzMethod DotStarEsp32DmaVspi4BitMethod;
#endif
// Clock Speed and Default Definitions for DotStarEsp32DmaHspi4Bit
typedef DotStarEsp32DmaSpiMethod<SpiSpeed40Mhz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4Bit40MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed20Mhz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4Bit20MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed10Mhz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4Bit10MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed5Mhz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4Bit5MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed2Mhz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4Bit2MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed1Mhz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4Bit1MhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeed500Khz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4Bit500KhzMethod;
typedef DotStarEsp32DmaSpiMethod<SpiSpeedHz,Esp32Hspi4BitBus> DotStarEsp32DmaHspi4BitHzMethod;
typedef DotStarEsp32DmaHspi4Bit10MhzMethod DotStarEsp32DmaHspi4BitMethod;

View File

@ -37,6 +37,8 @@ License along with NeoPixel. If not, see
template<typename T_TWOWIRE> class DotStarMethodBase
{
public:
typedef typename T_TWOWIRE::SettingsObject SettingsObject;
DotStarMethodBase(uint8_t pinClock, uint8_t pinData, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_sizeEndFrame((pixelCount + 15) / 16), // 16 = div 2 (bit for every two pixels) div 8 (bits to bytes)
@ -112,6 +114,11 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
_wire.applySettings(settings);
}
private:
const size_t _sizeData; // Size of '_data' buffer below
const size_t _sizeEndFrame;
@ -127,12 +134,37 @@ typedef DotStarMethodBase<TwoWireBitBangImple> DotStarMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed40Mhz>> DotStarSpi40MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed20Mhz>> DotStarSpi20MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed10Mhz>> DotStarSpi10MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed5Mhz>> DotStarSpi5MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed2Mhz>> DotStarSpi2MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed1Mhz>> DotStarSpi1MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed500Khz>> DotStarSpi500KhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeedHz>> DotStarSpiHzMethod;
typedef DotStarSpi10MhzMethod DotStarSpiMethod;
#endif
#if defined(ARDUINO_ARCH_ESP32)
// Give option to use Vspi alias of Spi class if wanting to specify which SPI peripheral is used on the ESP32
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed40Mhz>> DotStarVspi40MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed20Mhz>> DotStarVspi20MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed10Mhz>> DotStarVspi10MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed5Mhz>> DotStarVspi5MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed2Mhz>> DotStarVspi2MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed1Mhz>> DotStarVspi1MhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeed500Khz>> DotStarVspi500KhzMethod;
typedef DotStarMethodBase<TwoWireSpiImple<SpiSpeedHz>> DotStarVspiHzMethod;
typedef DotStarSpi10MhzMethod DotStarVspiMethod;
#include "TwoWireHspiImple.h"
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed40Mhz>> DotStarHspi40MhzMethod;
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed20Mhz>> DotStarHspi20MhzMethod;
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed10Mhz>> DotStarHspi10MhzMethod;
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed5Mhz>> DotStarHspi5MhzMethod;
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed2Mhz>> DotStarHspi2MhzMethod;
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed1Mhz>> DotStarHspi1MhzMethod;
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeed500Khz>> DotStarHspi500KhzMethod;
typedef DotStarMethodBase<TwoWireHspiImple<SpiSpeedHz>> DotStarHspiHzMethod;
typedef DotStarHspi10MhzMethod DotStarHspiMethod;
#endif

View File

@ -15,7 +15,12 @@
// See the License for the specific language governing permissions and
// limitations under the License.
#if defined(ARDUINO_ARCH_ESP32)
#if defined(ARDUINO_ARCH_ESP32)
#include "sdkconfig.h" // this sets useful config symbols, like CONFIG_IDF_TARGET_ESP32C3
// ESP32C3 I2S is not supported yet due to significant changes to interface
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
#include <string.h>
#include <stdio.h>
@ -38,7 +43,10 @@
#include "soc/io_mux_reg.h"
#include "soc/rtc_cntl_reg.h"
#include "soc/i2s_struct.h"
#if defined(CONFIG_IDF_TARGET_ESP32)
/* included here for ESP-IDF v4.x compatibility */
#include "soc/dport_reg.h"
#endif
#include "soc/sens_reg.h"
#include "driver/gpio.h"
#include "driver/i2s.h"
@ -104,7 +112,7 @@ typedef struct {
static uint8_t i2s_silence_buf[I2S_DMA_SILENCE_SIZE] = { 0 };
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (I2S_NUM_MAX == 2)
static i2s_bus_t I2S[I2S_NUM_MAX] = {
{&I2S0, -1, -1, -1, -1, 0, NULL, NULL, i2s_silence_buf, I2S_DMA_SILENCE_SIZE, NULL, I2S_DMA_BLOCK_COUNT_DEFAULT, 0, 0, I2s_Is_Idle},
@ -129,16 +137,16 @@ bool i2sInitDmaItems(uint8_t bus_num) {
size_t dmaCount = I2S[bus_num].dma_count;
if (I2S[bus_num].dma_items == NULL) {
I2S[bus_num].dma_items = (i2s_dma_item_t*)(malloc(dmaCount * sizeof(i2s_dma_item_t)));
I2S[bus_num].dma_items = (i2s_dma_item_t*)heap_caps_malloc(dmaCount * sizeof(i2s_dma_item_t), MALLOC_CAP_DMA);
if (I2S[bus_num].dma_items == NULL) {
log_e("MEM ERROR!");
return false;
}
}
int i, i2, a;
int i, i2;
i2s_dma_item_t* item = NULL;
i2s_dma_item_t* itemPrev;
i2s_dma_item_t* itemPrev = NULL;
for(i=0; i< dmaCount; i++) {
itemPrev = item;
@ -178,7 +186,7 @@ esp_err_t i2sSetClock(uint8_t bus_num, uint8_t div_num, uint8_t div_b, uint8_t d
typeof(i2s->clkm_conf) clkm_conf;
clkm_conf.val = 0;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
clkm_conf.clka_en = 0;
#else
clkm_conf.clk_sel = 2;
@ -213,7 +221,7 @@ void i2sSetPins(uint8_t bus_num, int8_t out, bool invert) {
pinMode(out, OUTPUT);
int i2sSignal;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (I2S_NUM_MAX == 2)
if (bus_num == 1) {
i2sSignal = I2S1O_DATA_OUT23_IDX;
@ -259,7 +267,7 @@ void i2sInit(uint8_t bus_num,
return;
}
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (I2S_NUM_MAX == 2)
if (bus_num) {
periph_module_enable(PERIPH_I2S1_MODULE);
@ -301,7 +309,7 @@ void i2sInit(uint8_t bus_num,
lc_conf.out_eof_mode = 1;
i2s->lc_conf.val = lc_conf.val;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
i2s->pdm_conf.pcm2pdm_conv_en = 0;
i2s->pdm_conf.pdm2pcm_conv_en = 0;
#endif
@ -332,7 +340,7 @@ void i2sInit(uint8_t bus_num,
i2s->fifo_conf.tx_fifo_mod_force_en = 1;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
i2s->pdm_conf.rx_pdm_en = 0;
i2s->pdm_conf.tx_pdm_en = 0;
#endif
@ -342,7 +350,7 @@ void i2sInit(uint8_t bus_num,
// enable intr in cpu //
int i2sIntSource;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (I2S_NUM_MAX == 2)
if (bus_num == 1) {
i2sIntSource = ETS_I2S1_INTR_SOURCE;
@ -448,7 +456,6 @@ size_t i2sWrite(uint8_t bus_num, uint8_t* data, size_t len, bool copy, bool free
}
size_t blockSize = len;
i2s_dma_item_t* itemPrev = NULL;
i2s_dma_item_t* item = &I2S[bus_num].dma_items[0];
size_t dataLeft = len;
uint8_t* pos = data;
@ -469,7 +476,6 @@ size_t i2sWrite(uint8_t bus_num, uint8_t* data, size_t len, bool copy, bool free
item->blocksize = blockSize;
item->datalen = blockSize;
itemPrev = item;
item++;
pos += blockSize;
@ -488,5 +494,6 @@ size_t i2sWrite(uint8_t bus_num, uint8_t* data, size_t len, bool copy, bool free
return len;
}
#endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
#endif // defined(ARDUINO_ARCH_ESP32)
#endif

View File

@ -1,6 +1,7 @@
#pragma once
#if defined(ARDUINO_ARCH_ESP32)
// ESP32C3 I2S is not supported yet due to significant changes to interface
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#ifdef __cplusplus
extern "C" {

View File

@ -90,7 +90,7 @@ struct HtmlColor
// ------------------------------------------------------------------------
HtmlColor(const RgbColor& color)
{
Color = (uint32_t)color.R << 16 | (uint32_t)color.G << 8 | (uint32_t)color.B;
Color = static_cast<uint32_t>(color.R) << 16 | static_cast<uint32_t>(color.G) << 8 | static_cast<uint32_t>(color.B);
}
// ------------------------------------------------------------------------

View File

@ -37,6 +37,8 @@ License along with NeoPixel. If not, see
template<typename T_TWOWIRE> class Lpd6803MethodBase
{
public:
typedef typename T_TWOWIRE::SettingsObject SettingsObject;
Lpd6803MethodBase(uint8_t pinClock, uint8_t pinData, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_sizeFrame((pixelCount + 7) / 8), // bit for every pixel at least
@ -108,6 +110,11 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
_wire.applySettings(settings);
}
private:
const size_t _sizeData; // Size of '_data' buffer below
const size_t _sizeFrame;
@ -122,9 +129,13 @@ typedef Lpd6803MethodBase<TwoWireBitBangImple> Lpd6803Method;
#include "TwoWireSpiImple.h"
typedef Lpd6803MethodBase<TwoWireSpiImple<SpiSpeed20Mhz>> Lpd6803Spi20MhzMethod;
typedef Lpd6803MethodBase<TwoWireSpiImple<SpiSpeed10Mhz>> Lpd6803Spi10MhzMethod;
typedef Lpd6803MethodBase<TwoWireSpiImple<SpiSpeed5Mhz>> Lpd6803Spi5MhzMethod;
typedef Lpd6803MethodBase<TwoWireSpiImple<SpiSpeed2Mhz>> Lpd6803Spi2MhzMethod;
typedef Lpd6803MethodBase<TwoWireSpiImple<SpiSpeed1Mhz>> Lpd6803Spi1MhzMethod;
typedef Lpd6803MethodBase<TwoWireSpiImple<SpiSpeed500Khz>> Lpd6803Spi500KhzMethod;
typedef Lpd6803MethodBase<TwoWireSpiImple<SpiSpeedHz>> Lpd6803SpiHzMethod;
typedef Lpd6803Spi10MhzMethod Lpd6803SpiMethod;
#endif

View File

@ -37,6 +37,8 @@ License along with NeoPixel. If not, see
template<typename T_TWOWIRE> class Lpd8806MethodBase
{
public:
typedef typename T_TWOWIRE::SettingsObject SettingsObject;
Lpd8806MethodBase(uint8_t pinClock, uint8_t pinData, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_sizeFrame((pixelCount + 31) / 32),
@ -108,6 +110,11 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
_wire.applySettings(settings);
}
private:
const size_t _sizeData; // Size of '_data' buffer below
const size_t _sizeFrame;
@ -122,9 +129,13 @@ typedef Lpd8806MethodBase<TwoWireBitBangImple> Lpd8806Method;
#include "TwoWireSpiImple.h"
typedef Lpd8806MethodBase<TwoWireSpiImple<SpiSpeed20Mhz>> Lpd8806Spi20MhzMethod;
typedef Lpd8806MethodBase<TwoWireSpiImple<SpiSpeed10Mhz>> Lpd8806Spi10MhzMethod;
typedef Lpd8806MethodBase<TwoWireSpiImple<SpiSpeed5Mhz>> Lpd8806Spi5MhzMethod;
typedef Lpd8806MethodBase<TwoWireSpiImple<SpiSpeed2Mhz>> Lpd8806Spi2MhzMethod;
typedef Lpd8806MethodBase<TwoWireSpiImple<SpiSpeed1Mhz>> Lpd8806Spi1MhzMethod;
typedef Lpd8806MethodBase<TwoWireSpiImple<SpiSpeed500Khz>> Lpd8806Spi500KhzMethod;
typedef Lpd8806MethodBase<TwoWireSpiImple<SpiSpeedHz>> Lpd8806SpiHzMethod;
typedef Lpd8806Spi10MhzMethod Lpd8806SpiMethod;
#endif

View File

@ -35,6 +35,8 @@ License along with NeoPixel. If not, see
template<typename T_SPEED> class NeoArmMethodBase
{
public:
typedef NeoNoSettings SettingsObject;
NeoArmMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_pin(pin)
@ -99,6 +101,10 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
}
private:
const size_t _sizeData; // Size of '_data' buffer below
@ -136,6 +142,12 @@ public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmMk20dxSpeedPropsTm1829 : public NeoArmMk20dxSpeedProps800KbpsBase
{
public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmMk20dxSpeedProps800Kbps : public NeoArmMk20dxSpeedProps800KbpsBase
{
public:
@ -207,6 +219,7 @@ public:
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedPropsWs2812x>> NeoArmWs2812xMethod;
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedPropsSk6812>> NeoArmSk6812Method;
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedPropsTm1814>> NeoArmTm1814InvertedMethod;
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedPropsTm1829>> NeoArmTm1829InvertedMethod;
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedPropsApa106>> NeoArmApa106Method;
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedProps800Kbps>> NeoArm800KbpsMethod;
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedProps400Kbps>> NeoArm400KbpsMethod;
@ -324,6 +337,12 @@ public:
const static uint32_t ResetTimeUs = 200;
};
class NeoArmMk26z64SpeedTm1829 : public NeoArmMk26z64Speed800KbpsBase
{
public:
const static uint32_t ResetTimeUs = 200;
};
class NeoArmMk26z64Speed800Kbps : public NeoArmMk26z64Speed800KbpsBase
{
public:
@ -333,6 +352,7 @@ public:
typedef NeoArmMethodBase<NeoArmMk26z64SpeedWs2812x> NeoArmWs2812xMethod;
typedef NeoArmMethodBase<NeoArmMk26z64SpeedSk6812> NeoArmSk6812Method;
typedef NeoArmMethodBase<NeoArmMk26z64SpeedTm1814> NeoArmTm1814InvertedMethod;
typedef NeoArmMethodBase<NeoArmMk26z64SpeedTm1829> NeoArmTm1829InvertedMethod;
typedef NeoArmMethodBase<NeoArmMk26z64Speed800Kbps> NeoArm800KbpsMethod;
typedef NeoArm800KbpsMethod NeoArmApa106Method;
@ -386,6 +406,12 @@ public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmSamd21g18aSpeedPropsTm1829 : public NeoArmSamd21g18aSpeedProps800KbpsBase
{
public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmSamd21g18aSpeedProps800Kbps : public NeoArmSamd21g18aSpeedProps800KbpsBase
{
public:
@ -475,6 +501,7 @@ public:
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedPropsWs2812x>> NeoArmWs2812xMethod;
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedPropsSk6812>> NeoArmSk6812Method;
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedPropsTm1814>> NeoArmTm1814InvertedMethod;
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedPropsTm1829>> NeoArmTm1829InvertedMethod;
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedProps800Kbps>> NeoArm800KbpsMethod;
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedProps400Kbps>> NeoArm400KbpsMethod;
typedef NeoArm400KbpsMethod NeoArmApa106Method;
@ -551,6 +578,12 @@ public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmStm32SpeedPropsTm1829 : public NeoArmStm32SpeedProps800KbpsBase
{
public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmStm32SpeedProps800Kbps : public NeoArmStm32SpeedProps800KbpsBase
{
public:
@ -663,6 +696,7 @@ public:
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropsWs2812x>> NeoArmWs2812xMethod;
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropsSk6812>> NeoArmSk6812Method;
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropstm1814>> NeoArmTm1814InvertedMethod;
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropstm1829>> NeoArmTm1829InvertedMethod;
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedProps800Kbps>> NeoArm800KbpsMethod;
typedef NeoArm800KbpsMethod NeoArmApa106Method;
@ -675,9 +709,9 @@ typedef NeoArm800KbpsMethod NeoArmApa106Method;
class NeoArmOtherSpeedProps800KbpsBase
{
public:
static const uint32_t CyclesT0h = ((uint32_t)(0.40 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t CyclesT1h = ((uint32_t)(0.80 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t Cycles = ((uint32_t)(1.25 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t CyclesT0h = static_cast<uint32_t>((0.40 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t CyclesT1h = static_cast<uint32_t>((0.80 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t Cycles = static_cast<uint32_t>((1.25 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
};
class NeoArmOtherSpeedPropsWs2812x : public NeoArmOtherSpeedProps800KbpsBase
@ -698,6 +732,12 @@ public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmOtherSpeedPropsTm1829 : public NeoArmOtherSpeedProps800KbpsBase
{
public:
static const uint32_t ResetTimeUs = 200;
};
class NeoArmOtherSpeedProps800Kbps : public NeoArmOtherSpeedProps800KbpsBase
{
public:
@ -707,9 +747,9 @@ public:
class NeoArmOtherSpeedProps400Kbps
{
public:
static const uint32_t CyclesT0h = ((uint32_t)(0.50 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t CyclesT1h = ((uint32_t)(1.20 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t Cycles = ((uint32_t)(2.50 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t CyclesT0h = static_cast<uint32_t>((0.50 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t CyclesT1h = static_cast<uint32_t>((1.20 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t Cycles = static_cast<uint32_t>((2.50 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST));
static const uint32_t ResetTimeUs = 50;
};
@ -733,7 +773,7 @@ public:
uint8_t mask;
pmc_set_writeprotect(false);
pmc_enable_periph_clk((uint32_t)TC3_IRQn);
pmc_enable_periph_clk(static_cast<uint32_t>(TC3_IRQn));
TC_Configure(TC1, 0,
TC_CMR_WAVE | TC_CMR_WAVSEL_UP | TC_CMR_TCCLKS_TIMER_CLOCK1);
@ -792,6 +832,7 @@ public:
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedPropsWs2812x>> NeoArmWs2812xMethod;
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedPropsSk6812>> NeoArmSk6812Method;
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedPropsTm1814>> NeoArmTm1814InvertedMethod;
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedPropsTm1829>> NeoArmTm1829InvertedMethod;
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedProps800Kbps>> NeoArm800KbpsMethod;
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedProps400Kbps>> NeoArm400KbpsMethod;
typedef NeoArm400KbpsMethod NeoArmApa106Method;
@ -813,6 +854,7 @@ typedef NeoArm400KbpsMethod Neo400KbpsMethod;
#endif
// there is no invert methods for arm, but the norm for TM1814 is inverted, so
typedef NeoArmTm1814InvertedMethod NeoTm1814InvertedMethod;
typedef NeoArmTm1829InvertedMethod NeoTm1829InvertedMethod;
#endif // defined(__arm__)

View File

@ -89,6 +89,12 @@ public:
static const uint32_t ResetTimeUs = 200;
};
class NeoAvrSpeedTm1829 : public NeoAvrSpeed800KbpsBase
{
public:
static const uint32_t ResetTimeUs = 200;
};
class NeoAvrSpeed800Kbps: public NeoAvrSpeed800KbpsBase
{
public:
@ -118,6 +124,8 @@ public:
template<typename T_SPEED> class NeoAvrMethodBase
{
public:
typedef NeoNoSettings SettingsObject;
NeoAvrMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_pin(pin),
@ -189,6 +197,10 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
}
private:
const size_t _sizeData; // size of _data below
const uint8_t _pin; // output pin number
@ -204,6 +216,7 @@ private:
typedef NeoAvrMethodBase<NeoAvrSpeedWs2812x> NeoAvrWs2812xMethod;
typedef NeoAvrMethodBase<NeoAvrSpeedSk6812> NeoAvrSk6812Method;
typedef NeoAvrMethodBase<NeoAvrSpeedTm1814> NeoAvrTm1814InvertedMethod;
typedef NeoAvrMethodBase<NeoAvrSpeedTm1829> NeoAvrTm1829InvertedMethod;
typedef NeoAvrMethodBase<NeoAvrSpeed800Kbps> NeoAvr800KbpsMethod;
typedef NeoAvrMethodBase<NeoAvrSpeed400Kbps> NeoAvr400KbpsMethod;
@ -220,5 +233,6 @@ typedef NeoAvrWs2812xMethod Neo800KbpsMethod;
typedef NeoAvr400KbpsMethod Neo400KbpsMethod;
typedef NeoAvrTm1814InvertedMethod NeoTm1814InvertedMethod;
typedef NeoAvrTm1829InvertedMethod NeoTm1829InvertedMethod;
#endif

View File

@ -206,7 +206,7 @@ public:
{
for (int16_t x = 0; x < wSrc && indexPixel < destPixelCount; x++, indexPixel++)
{
if ((uint16_t)xSrc < _width)
if (static_cast<uint16_t>(xSrc) < _width)
{
if (readPixel(&color))
{
@ -255,7 +255,7 @@ public:
{
uint16_t indexDest = layoutMap(xDest + x, yDest + y);
if ((uint16_t)xFile < _width)
if (static_cast<uint16_t>(xFile) < _width)
{
if (readPixel(&color))
{
@ -311,7 +311,7 @@ private:
{
x = 0;
}
else if ((uint16_t)x >= _width)
else if (static_cast<uint16_t>(x) >= _width)
{
x = _width - 1;
}
@ -324,7 +324,7 @@ private:
{
y = 0;
}
else if ((uint16_t)y >= _height)
else if (static_cast<uint16_t>(y) >= _height)
{
y = _height - 1;
}

View File

@ -162,9 +162,9 @@ private:
uint16_t result = PixelIndex_OutOfBounds;
if (x >= 0 &&
(uint16_t)x < Width() &&
static_cast<uint16_t>(x) < Width() &&
y >= 0 &&
(uint16_t)y < Height())
static_cast<uint16_t>(y) < Height())
{
result = x + y * Width();
}

View File

@ -19,11 +19,12 @@ enum NeoBusChannel
NeoBusChannel_3,
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
NeoBusChannel_4,
NeoBusChannel_5,
NeoBusChannel_6,
NeoBusChannel_7,
#endif // CONFIG_IDF_TARGET_ESP32S2
#endif
#endif // ARDUINO_ARCH_ESP32
};

View File

@ -26,7 +26,8 @@ License along with NeoPixel. If not, see
#pragma once
#ifdef ARDUINO_ARCH_ESP32
// ESP32C3 I2S is not supported yet due to significant changes to interface
#if defined(ARDUINO_ARCH_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32C3)
extern "C"
{
@ -60,6 +61,14 @@ public:
const static uint16_t ResetTimeUs = 200;
};
class NeoEsp32I2sSpeedTm1829
{
public:
const static uint32_t I2sSampleRate = 100000;
const static uint16_t ByteSendTimeUs = 10;
const static uint16_t ResetTimeUs = 200;
};
class NeoEsp32I2sSpeed800Kbps
{
public:
@ -128,6 +137,8 @@ public:
template<typename T_SPEED, typename T_BUS, typename T_INVERT> class NeoEsp32I2sMethodBase
{
public:
typedef NeoNoSettings SettingsObject;
NeoEsp32I2sMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_pin(pin)
@ -198,6 +209,10 @@ public:
return _sizeData;
}
void applySettings(const SettingsObject& settings)
{
}
private:
const size_t _sizeData; // Size of '_data' buffer
const uint8_t _pin; // output pin number
@ -210,7 +225,11 @@ private:
void construct(uint16_t pixelCount, size_t elementSize, size_t settingsSize)
{
ESP_ERROR_CHECK(pixelCount >= 2 ? ESP_OK : ESP_ERR_INVALID_ARG);
// DMA is too fast to support a single pixel and maintain consistency
if (pixelCount < 2)
{
pixelCount = 2;
}
uint16_t dmaSettingsSize = c_dmaBytesPerPixelBytes * settingsSize;
uint16_t dmaPixelSize = c_dmaBytesPerPixelBytes * elementSize;
@ -228,7 +247,7 @@ private:
_data = static_cast<uint8_t*>(malloc(_sizeData));
// data cleared later in Begin()
_i2sBuffer = static_cast<uint8_t*>(malloc(_i2sBufferSize));
_i2sBuffer = static_cast<uint8_t*>(heap_caps_malloc(_i2sBufferSize, MALLOC_CAP_DMA));
// no need to initialize all of it, but since it contains
// "reset" bits that don't latter get overwritten we just clear it all
memset(_i2sBuffer, 0x00, _i2sBufferSize);
@ -257,6 +276,7 @@ private:
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Ws2812xMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Sk6812Method;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Tm1814Method;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Tm1829Method;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0800KbpsMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0400KbpsMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Apa106Method;
@ -265,16 +285,18 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusZero, NeoEsp
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Ws2812xInvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Sk6812InvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Tm1814InvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Tm1829InvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0800KbpsInvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0400KbpsInvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Apa106InvertedMethod;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (I2S_NUM_MAX == 2)
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Ws2812xMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Sk6812Method;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Tm1814Method;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Tm1829Method;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1800KbpsMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1400KbpsMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Apa106Method;
@ -282,6 +304,7 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusOne, NeoEsp3
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Ws2812xInvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Sk6812InvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Tm1814InvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Tm1829InvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1800KbpsInvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1400KbpsInvertedMethod;
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Apa106InvertedMethod;
@ -303,14 +326,17 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusN, NeoEsp32I
#endif
/* due to a core issue where requests to send aren't consistent, I2s is no longer the default
#if !defined(NEOPIXEL_ESP32_RMT_DEFAULT) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// I2s Bus 1 method is the default method for Esp32
// Esp32S2 & Esp32C3 will use RMT as the default allways
typedef NeoEsp32I2s1Ws2812xMethod NeoWs2813Method;
typedef NeoEsp32I2s1Ws2812xMethod NeoWs2812xMethod;
typedef NeoEsp32I2s1800KbpsMethod NeoWs2812Method;
typedef NeoEsp32I2s1Ws2812xMethod NeoWs2811Method;
typedef NeoEsp32I2s1Sk6812Method NeoSk6812Method;
typedef NeoEsp32I2s1Tm1814Method NeoTm1814Method;
typedef NeoEsp32I2s1Tm1829Method NeoTm1829Method;
typedef NeoEsp32I2s1Sk6812Method NeoLc8812Method;
typedef NeoEsp32I2s1Apa106Method NeoApa106Method;
@ -323,11 +349,13 @@ typedef NeoEsp32I2s1Ws2812xInvertedMethod NeoWs2811InvertedMethod;
typedef NeoEsp32I2s1800KbpsInvertedMethod NeoWs2812InvertedMethod;
typedef NeoEsp32I2s1Sk6812InvertedMethod NeoSk6812InvertedMethod;
typedef NeoEsp32I2s1Tm1814InvertedMethod NeoTm1814InvertedMethod;
typedef NeoEsp32I2s1Tm1829InvertedMethod NeoTm1829InvertedMethod;
typedef NeoEsp32I2s1Sk6812InvertedMethod NeoLc8812InvertedMethod;
typedef NeoEsp32I2s1Apa106InvertedMethod NeoApa106InvertedMethod;
typedef NeoEsp32I2s1Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
typedef NeoEsp32I2s1400KbpsInvertedMethod Neo400KbpsInvertedMethod;
*/
#endif
#endif // !defined(NEOPIXEL_ESP32_RMT_DEFAULT) && !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#endif

View File

@ -27,6 +27,8 @@ License along with NeoPixel. If not, see
<http://www.gnu.org/licenses/>.
-------------------------------------------------------------------------*/
#include <Arduino.h>
#include "NeoSettings.h"
#include "NeoBusChannel.h"
#include "NeoEsp32RmtMethod.h"
@ -184,6 +186,17 @@ void NeoEsp32RmtSpeedApa106::Translate(const void* src,
RmtBit0, RmtBit1, RmtDurationReset);
}
void NeoEsp32RmtSpeedTx1812::Translate(const void* src,
rmt_item32_t* dest,
size_t src_size,
size_t wanted_num,
size_t* translated_size,
size_t* item_num)
{
_translate(src, dest, src_size, wanted_num, translated_size, item_num,
RmtBit0, RmtBit1, RmtDurationReset);
}
void NeoEsp32RmtInvertedSpeedWs2811::Translate(const void* src,
rmt_item32_t* dest,
size_t src_size,
@ -260,4 +273,15 @@ void NeoEsp32RmtInvertedSpeedApa106::Translate(const void* src,
_translate(src, dest, src_size, wanted_num, translated_size, item_num,
RmtBit0, RmtBit1, RmtDurationReset);
}
void NeoEsp32RmtInvertedSpeedTx1812::Translate(const void* src,
rmt_item32_t* dest,
size_t src_size,
size_t wanted_num,
size_t* translated_size,
size_t* item_num)
{
_translate(src, dest, src_size, wanted_num, translated_size, item_num,
RmtBit0, RmtBit1, RmtDurationReset);
}
#endif

View File

@ -168,6 +168,22 @@ public:
size_t* item_num);
};
// normal is inverted signal
class NeoEsp32RmtSpeedTm1829 : public NeoEsp32RmtInvertedSpeedBase
{
public:
const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 900);
const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 400);
const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
static void IRAM_ATTR Translate(const void* src,
rmt_item32_t* dest,
size_t src_size,
size_t wanted_num,
size_t* translated_size,
size_t* item_num);
};
class NeoEsp32RmtSpeed800Kbps : public NeoEsp32RmtSpeedBase
{
public:
@ -213,6 +229,21 @@ public:
size_t* item_num);
};
class NeoEsp32RmtSpeedTx1812 : public NeoEsp32RmtSpeedBase
{
public:
const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 600);
const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(600, 300);
const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us
static void IRAM_ATTR Translate(const void* src,
rmt_item32_t* dest,
size_t src_size,
size_t wanted_num,
size_t* translated_size,
size_t* item_num);
};
class NeoEsp32RmtInvertedSpeedWs2811 : public NeoEsp32RmtInvertedSpeedBase
{
public:
@ -274,6 +305,22 @@ public:
size_t* item_num);
};
// normal is inverted signal
class NeoEsp32RmtInvertedSpeedTm1829 : public NeoEsp32RmtSpeedBase
{
public:
const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 900);
const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(800, 400);
const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(200000); // 200us
static void IRAM_ATTR Translate(const void* src,
rmt_item32_t* dest,
size_t src_size,
size_t wanted_num,
size_t* translated_size,
size_t* item_num);
};
class NeoEsp32RmtInvertedSpeed800Kbps : public NeoEsp32RmtInvertedSpeedBase
{
public:
@ -319,6 +366,21 @@ public:
size_t* item_num);
};
class NeoEsp32RmtInvertedSpeedTx1812 : public NeoEsp32RmtInvertedSpeedBase
{
public:
const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 600);
const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(600, 300);
const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us
static void IRAM_ATTR Translate(const void* src,
rmt_item32_t* dest,
size_t src_size,
size_t wanted_num,
size_t* translated_size,
size_t* item_num);
};
class NeoEsp32RmtChannel0
{
public:
@ -351,7 +413,7 @@ public:
const static rmt_channel_t RmtChannelNumber = RMT_CHANNEL_3;
};
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
class NeoEsp32RmtChannel4
{
@ -403,6 +465,8 @@ public:
template<typename T_SPEED, typename T_CHANNEL> class NeoEsp32RmtMethodBase
{
public:
typedef NeoNoSettings SettingsObject;
NeoEsp32RmtMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_pin(pin)
@ -492,6 +556,10 @@ public:
return _sizeData;
}
void applySettings(const SettingsObject& settings)
{
}
private:
const size_t _sizeData; // Size of '_data*' buffers
const uint8_t _pin; // output pin number
@ -518,6 +586,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannelN> NeoE
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannelN> NeoEsp32RmtNSk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannelN> NeoEsp32RmtNApa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannelN> NeoEsp32RmtNTx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN400KbpsMethod;
@ -525,7 +594,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel0> NeoEs
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel0> NeoEsp32Rmt0Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0400KbpsMethod;
@ -533,7 +604,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel1> NeoEs
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel1> NeoEsp32Rmt1Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1400KbpsMethod;
@ -541,7 +614,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel2> NeoEs
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel2> NeoEsp32Rmt2Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2400KbpsMethod;
@ -549,18 +624,22 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel3> NeoEs
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel3> NeoEsp32Rmt3Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3400KbpsMethod;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (RMT_CHANNEL_MAX == 8)
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2811Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel4> NeoEsp32Rmt4Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4400KbpsMethod;
@ -568,7 +647,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel5> NeoEs
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel5> NeoEsp32Rmt5Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5400KbpsMethod;
@ -576,7 +657,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel6> NeoEs
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel6> NeoEsp32Rmt6Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6400KbpsMethod;
@ -584,7 +667,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel7> NeoEs
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2812xMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Sk6812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1814Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1829Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel7> NeoEsp32Rmt7Apa106Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tx1812Method;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7800KbpsMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7400KbpsMethod;
@ -596,6 +681,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChanne
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannelN> NeoEsp32RmtNSk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannelN> NeoEsp32RmtNApa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannelN> NeoEsp32RmtNTx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN400KbpsInvertedMethod;
@ -603,7 +689,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel0> NeoEsp32Rmt0Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel0> NeoEsp32Rmt0Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0400KbpsInvertedMethod;
@ -611,7 +699,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel1> NeoEsp32Rmt1Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel1> NeoEsp32Rmt1Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1400KbpsInvertedMethod;
@ -619,7 +709,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel2> NeoEsp32Rmt2Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2400KbpsInvertedMethod;
@ -627,18 +719,22 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel3> NeoEsp32Rmt3Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel3> NeoEsp32Rmt3Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel3> NeoEsp32Rmt3400KbpsInvertedMethod;
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (RMT_CHANNEL_MAX == 8)
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2811InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel4> NeoEsp32Rmt4Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel4> NeoEsp32Rmt4Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4400KbpsInvertedMethod;
@ -646,7 +742,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel5> NeoEsp32Rmt5Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel5> NeoEsp32Rmt5Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5400KbpsInvertedMethod;
@ -654,7 +752,9 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel6> NeoEsp32Rmt6Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel6> NeoEsp32Rmt6Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6400KbpsInvertedMethod;
@ -662,15 +762,22 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel7> NeoEsp32Rmt7Ws2812xInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Sk6812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1814InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1829InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel7> NeoEsp32Rmt7Apa106InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tx1812InvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7800KbpsInvertedMethod;
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7400KbpsInvertedMethod;
#endif
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
#if defined(NEOPIXEL_ESP32_RMT_DEFAULT) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
// Normally I2s method is the default, defining NEOPIXEL_ESP32_RMT_DEFAULT
// will switch to use RMT as the default method
// The ESP32S2 & ESP32C3 will always defualt to RMT
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// (RMT_CHANNEL_MAX == 8)
// due to a core issue where requests to send aren't consistent with I2s, RMT ch6 is temporarily the default
// RMT channel 6 method is the default method for Esp32
typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2813Method;
typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2812xMethod;
@ -678,8 +785,10 @@ typedef NeoEsp32Rmt6800KbpsMethod NeoWs2812Method;
typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2811Method;
typedef NeoEsp32Rmt6Sk6812Method NeoSk6812Method;
typedef NeoEsp32Rmt6Tm1814Method NeoTm1814Method;
typedef NeoEsp32Rmt6Tm1829Method NeoTm1829Method;
typedef NeoEsp32Rmt6Sk6812Method NeoLc8812Method;
typedef NeoEsp32Rmt6Apa106Method NeoApa106Method;
typedef NeoEsp32Rmt6Tx1812Method NeoTx1812Method;
typedef NeoEsp32Rmt6Ws2812xMethod Neo800KbpsMethod;
typedef NeoEsp32Rmt6400KbpsMethod Neo400KbpsMethod;
@ -690,23 +799,26 @@ typedef NeoEsp32Rmt6Ws2812xInvertedMethod NeoWs2811InvertedMethod;
typedef NeoEsp32Rmt6800KbpsInvertedMethod NeoWs2812InvertedMethod;
typedef NeoEsp32Rmt6Sk6812InvertedMethod NeoSk6812InvertedMethod;
typedef NeoEsp32Rmt6Tm1814InvertedMethod NeoTm1814InvertedMethod;
typedef NeoEsp32Rmt6Tm1829InvertedMethod NeoTm1829InvertedMethod;
typedef NeoEsp32Rmt6Sk6812InvertedMethod NeoLc8812InvertedMethod;
typedef NeoEsp32Rmt6Apa106InvertedMethod NeoApa106InvertedMethod;
typedef NeoEsp32Rmt6Tx1812InvertedMethod NeoTx1812InvertedMethod;
typedef NeoEsp32Rmt6Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
typedef NeoEsp32Rmt6400KbpsInvertedMethod Neo400KbpsInvertedMethod;
#else
#else // !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
// due to a core issue where requests to send aren't consistent with I2s, RMT ch3 is temporarily the default
// RMT channel 3 method is the default method for Esp32S2
// RMT channel 3 method is the default method for Esp32S2 & Esp32C3
typedef NeoEsp32Rmt3Ws2812xMethod NeoWs2813Method;
typedef NeoEsp32Rmt3Ws2812xMethod NeoWs2812xMethod;
typedef NeoEsp32Rmt3800KbpsMethod NeoWs2812Method;
typedef NeoEsp32Rmt3Ws2812xMethod NeoWs2811Method;
typedef NeoEsp32Rmt3Sk6812Method NeoSk6812Method;
typedef NeoEsp32Rmt3Tm1814Method NeoTm1814Method;
typedef NeoEsp32Rmt3Tm1829Method NeoTm1829Method;
typedef NeoEsp32Rmt3Sk6812Method NeoLc8812Method;
typedef NeoEsp32Rmt3Apa106Method NeoApa106Method;
typedef NeoEsp32Rmt3Tx1812Method NeoTx1812Method;
typedef NeoEsp32Rmt3Ws2812xMethod Neo800KbpsMethod;
typedef NeoEsp32Rmt3400KbpsMethod Neo400KbpsMethod;
@ -717,12 +829,16 @@ typedef NeoEsp32Rmt3Ws2812xInvertedMethod NeoWs2811InvertedMethod;
typedef NeoEsp32Rmt3800KbpsInvertedMethod NeoWs2812InvertedMethod;
typedef NeoEsp32Rmt3Sk6812InvertedMethod NeoSk6812InvertedMethod;
typedef NeoEsp32Rmt3Tm1814InvertedMethod NeoTm1814InvertedMethod;
typedef NeoEsp32Rmt3Tm1829InvertedMethod NeoTm1829InvertedMethod;
typedef NeoEsp32Rmt3Sk6812InvertedMethod NeoLc8812InvertedMethod;
typedef NeoEsp32Rmt3Apa106InvertedMethod NeoApa106InvertedMethod;
typedef NeoEsp32Rmt3Tx1812InvertedMethod NeoTx1812InvertedMethod;
typedef NeoEsp32Rmt3Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
typedef NeoEsp32Rmt3400KbpsInvertedMethod Neo400KbpsInvertedMethod;
#endif
#endif // !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
#endif // defined(NEOPIXEL_ESP32_RMT_DEFAULT)
#endif

View File

@ -61,8 +61,8 @@ struct slc_queue_item
uint32 sub_sof : 1;
uint32 eof : 1;
uint32 owner : 1;
uint32 buf_ptr;
uint32 next_link_ptr;
uint8* buf_ptr;
struct slc_queue_item* next_link_ptr;
};
class NeoEsp8266DmaSpeedBase
@ -127,6 +127,12 @@ public:
const static uint32_t ResetTimeUs = 200;
};
class NeoEsp8266DmaInvertedSpeedTm1829 : public NeoEsp8266DmaSpeed800KbpsBase
{
public:
const static uint32_t ResetTimeUs = 200;
};
class NeoEsp8266DmaSpeed800Kbps : public NeoEsp8266DmaSpeed800KbpsBase
{
public:
@ -179,6 +185,12 @@ public:
const static uint32_t ResetTimeUs = 200;
};
class NeoEsp8266DmaSpeedTm1829 : public NeoEsp8266DmaInvertedSpeed800KbpsBase
{
public:
const static uint32_t ResetTimeUs = 200;
};
class NeoEsp8266DmaInvertedSpeed800Kbps : public NeoEsp8266DmaInvertedSpeed800KbpsBase
{
public:
@ -217,6 +229,8 @@ const uint8_t c_I2sPin = 3; // due to I2S hardware, the pin used is restricted t
template<typename T_SPEED> class NeoEsp8266DmaMethodBase
{
public:
typedef NeoNoSettings SettingsObject;
NeoEsp8266DmaMethodBase(uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize)
{
@ -300,9 +314,9 @@ public:
_i2sBufDesc[indexDesc].sub_sof = 0;
_i2sBufDesc[indexDesc].datalen = blockSize;
_i2sBufDesc[indexDesc].blocksize = blockSize;
_i2sBufDesc[indexDesc].buf_ptr = (uint32_t)is2Buffer;
_i2sBufDesc[indexDesc].buf_ptr = is2Buffer;
_i2sBufDesc[indexDesc].unused = 0;
_i2sBufDesc[indexDesc].next_link_ptr = (uint32_t)&(_i2sBufDesc[indexDesc + 1]);
_i2sBufDesc[indexDesc].next_link_ptr = reinterpret_cast<struct slc_queue_item*>(&(_i2sBufDesc[indexDesc + 1]));
is2Buffer += blockSize;
is2BufferSize -= blockSize;
@ -316,15 +330,15 @@ public:
_i2sBufDesc[indexDesc].sub_sof = 0;
_i2sBufDesc[indexDesc].datalen = sizeof(_i2sZeroes);
_i2sBufDesc[indexDesc].blocksize = sizeof(_i2sZeroes);
_i2sBufDesc[indexDesc].buf_ptr = (uint32_t)_i2sZeroes;
_i2sBufDesc[indexDesc].buf_ptr = _i2sZeroes;
_i2sBufDesc[indexDesc].unused = 0;
_i2sBufDesc[indexDesc].next_link_ptr = (uint32_t)&(_i2sBufDesc[indexDesc + 1]);
_i2sBufDesc[indexDesc].next_link_ptr = reinterpret_cast<struct slc_queue_item*>(&(_i2sBufDesc[indexDesc + 1]));
}
// the first state block will trigger the interrupt
_i2sBufDesc[indexDesc - 2].eof = 1;
// the last state block will loop to the first state block by defualt
_i2sBufDesc[indexDesc - 1].next_link_ptr = (uint32_t)&(_i2sBufDesc[indexDesc - 2]);
_i2sBufDesc[indexDesc - 1].next_link_ptr = reinterpret_cast<struct slc_queue_item*>(&(_i2sBufDesc[indexDesc - 2]));
// setup the rest of i2s DMA
//
@ -390,7 +404,7 @@ public:
I2SC |= I2STXS; // Start transmission
}
void ICACHE_RAM_ATTR Update(bool)
void IRAM_ATTR Update(bool)
{
// wait for not actively sending data
while (!IsReadyToUpdate())
@ -413,6 +427,10 @@ public:
return _sizeData;
}
void applySettings(const SettingsObject& settings)
{
}
private:
static NeoEsp8266DmaMethodBase* s_this; // for the ISR
@ -437,7 +455,7 @@ private:
// handle here is the RX_EOF_INT status, which indicate the DMA has sent a buffer whose
// descriptor has the 'EOF' field set to 1.
// in the case of this code, the second to last state descriptor
static void ICACHE_RAM_ATTR i2s_slc_isr(void)
static void IRAM_ATTR i2s_slc_isr(void)
{
ETS_SLC_INTR_DISABLE();
@ -458,7 +476,7 @@ private:
// data block has pending data waiting to send, prepare it
// point last state block to top
(finished_item + 1)->next_link_ptr = (uint32_t)(s_this->_i2sBufDesc);
(finished_item + 1)->next_link_ptr = s_this->_i2sBufDesc;
s_this->_dmaState = NeoDmaState_Sending;
}
@ -471,7 +489,7 @@ private:
// the data block had actual data sent
// point last state block to first state block thus
// just looping and not sending the data blocks
(finished_item + 1)->next_link_ptr = (uint32_t)(finished_item);
(finished_item + 1)->next_link_ptr = finished_item;
s_this->_dmaState = NeoDmaState_Zeroing;
}
@ -533,6 +551,7 @@ NeoEsp8266DmaMethodBase<T_SPEED>* NeoEsp8266DmaMethodBase<T_SPEED>::s_this;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedWs2812x> NeoEsp8266DmaWs2812xMethod;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedSk6812> NeoEsp8266DmaSk6812Method;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedTm1814> NeoEsp8266DmaTm1814Method;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedTm1829> NeoEsp8266DmaTm1829Method;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeed800Kbps> NeoEsp8266Dma800KbpsMethod;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeed400Kbps> NeoEsp8266Dma400KbpsMethod;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedApa106> NeoEsp8266DmaApa106Method;
@ -541,6 +560,7 @@ typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedApa106> NeoEsp8266DmaApa106Met
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedWs2812x> NeoEsp8266DmaInvertedWs2812xMethod;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedSk6812> NeoEsp8266DmaInvertedSk6812Method;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedTm1814> NeoEsp8266DmaInvertedTm1814Method;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedTm1829> NeoEsp8266DmaInvertedTm1829Method;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeed800Kbps> NeoEsp8266DmaInverted800KbpsMethod;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeed400Kbps> NeoEsp8266DmaInverted400KbpsMethod;
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedApa106> NeoEsp8266DmaInvertedApa106Method;
@ -552,6 +572,7 @@ typedef NeoEsp8266Dma800KbpsMethod NeoWs2812Method;
typedef NeoEsp8266DmaWs2812xMethod NeoWs2811Method;
typedef NeoEsp8266DmaSk6812Method NeoSk6812Method;
typedef NeoEsp8266DmaTm1814Method NeoTm1814Method;
typedef NeoEsp8266DmaTm1829Method NeoTm1829Method;
typedef NeoEsp8266DmaSk6812Method NeoLc8812Method;
typedef NeoEsp8266DmaApa106Method NeoApa106Method;
@ -565,6 +586,7 @@ typedef NeoEsp8266DmaInverted800KbpsMethod NeoWs2812InvertedMethod;
typedef NeoEsp8266DmaInvertedWs2812xMethod NeoWs2811InvertedMethod;
typedef NeoEsp8266DmaInvertedSk6812Method NeoSk6812InvertedMethod;
typedef NeoEsp8266DmaInvertedTm1814Method NeoTm1814InvertedMethod;
typedef NeoEsp8266DmaInvertedTm1829Method NeoTm1829InvertedMethod;
typedef NeoEsp8266DmaInvertedSk6812Method NeoLc8812InvertedMethod;
typedef NeoEsp8266DmaInvertedApa106Method NeoApa106InvertedMethod;

View File

@ -25,6 +25,9 @@ License along with NeoPixel. If not, see
-------------------------------------------------------------------------*/
#ifdef ARDUINO_ARCH_ESP8266
#include <Arduino.h>
#include "NeoSettings.h"
#include "NeoEsp8266UartMethod.h"
#include <utility>
extern "C"
@ -32,7 +35,7 @@ extern "C"
#include <ets_sys.h>
}
const volatile uint8_t* ICACHE_RAM_ATTR NeoEsp8266UartContext::FillUartFifo(uint8_t uartNum,
const volatile uint8_t* IRAM_ATTR NeoEsp8266UartContext::FillUartFifo(uint8_t uartNum,
const volatile uint8_t* start,
const volatile uint8_t* end)
{
@ -136,7 +139,7 @@ void NeoEsp8266UartInterruptContext::Detach(uint8_t uartNum)
ETS_UART_INTR_ENABLE();
}
void ICACHE_RAM_ATTR NeoEsp8266UartInterruptContext::Isr(void* param)
void IRAM_ATTR NeoEsp8266UartInterruptContext::Isr(void* param)
{
// make sure this is for us
if (param == s_uartInteruptContext)

View File

@ -37,17 +37,17 @@ class NeoEsp8266UartContext
{
public:
// Gets the number of bytes waiting in the TX FIFO
static inline uint8_t ICACHE_RAM_ATTR GetTxFifoLength(uint8_t uartNum)
static inline uint8_t IRAM_ATTR GetTxFifoLength(uint8_t uartNum)
{
return (USS(uartNum) >> USTXC) & 0xff;
}
// Append a byte to the TX FIFO
static inline void ICACHE_RAM_ATTR Enqueue(uint8_t uartNum, uint8_t value)
static inline void IRAM_ATTR Enqueue(uint8_t uartNum, uint8_t value)
{
USF(uartNum) = value;
}
static const volatile uint8_t* ICACHE_RAM_ATTR FillUartFifo(uint8_t uartNum,
static const volatile uint8_t* IRAM_ATTR FillUartFifo(uint8_t uartNum,
const volatile uint8_t* start,
const volatile uint8_t* end);
};
@ -79,7 +79,7 @@ private:
volatile const uint8_t* _asyncBuffEnd;
volatile static NeoEsp8266UartInterruptContext* s_uartInteruptContext[2];
static void ICACHE_RAM_ATTR Isr(void* param);
static void IRAM_ATTR Isr(void* param);
};
// this template feature class is used a base for all others and contains
@ -241,7 +241,7 @@ protected:
free(_dataSending);
}
void ICACHE_RAM_ATTR InitializeUart(uint32_t uartBaud, bool invert)
void IRAM_ATTR InitializeUart(uint32_t uartBaud, bool invert)
{
T_UARTFEATURE::Init(uartBaud, invert);
@ -303,6 +303,12 @@ public:
static const uint32_t ResetTimeUs = 200; // us between data send bursts to reset for next update
};
class NeoEsp8266UartSpeedTm1829 : public NeoEsp8266UartSpeed800KbpsBase
{
public:
static const uint32_t ResetTimeUs = 200; // us between data send bursts to reset for next update
};
// NeoEsp8266UartSpeed800Kbps contains the timing constant used to get NeoPixelBus running at 800Khz
class NeoEsp8266UartSpeed800Kbps : public NeoEsp8266UartSpeed800KbpsBase
{
@ -347,6 +353,8 @@ template<typename T_SPEED, typename T_BASE, typename T_INVERT>
class NeoEsp8266UartMethodBase: public T_BASE
{
public:
typedef NeoNoSettings SettingsObject;
NeoEsp8266UartMethodBase(uint16_t pixelCount, size_t elementSize, size_t settingsSize)
: T_BASE(pixelCount, elementSize, settingsSize)
{
@ -398,6 +406,10 @@ public:
return this->_sizeData;
};
void applySettings(const SettingsObject& settings)
{
}
private:
uint32_t getPixelTime() const
{
@ -409,6 +421,7 @@ private:
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Ws2812xMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Sk6812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart0Tm1814Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart0Tm1829Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Apa106Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart0800KbpsMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart0400KbpsMethod;
@ -422,6 +435,7 @@ typedef NeoEsp8266Uart0Sk6812Method NeoEsp8266Uart0Lc8812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Ws2812xMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Sk6812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart1Tm1814Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart1Tm1829Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Apa106Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart1800KbpsMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart1400KbpsMethod;
@ -435,6 +449,7 @@ typedef NeoEsp8266Uart1Sk6812Method NeoEsp8266Uart1Lc8812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Ws2812xMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Sk6812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Tm1814Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Tm1829Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Apa106Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0800KbpsMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0400KbpsMethod;
@ -448,6 +463,7 @@ typedef NeoEsp8266AsyncUart0Sk6812Method NeoEsp8266AsyncUart0Lc8812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Ws2812xMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Sk6812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Tm1814Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Tm1829Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Apa106Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1800KbpsMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1400KbpsMethod;
@ -463,6 +479,7 @@ typedef NeoEsp8266AsyncUart1Sk6812Method NeoEsp8266AsyncUart1Lc8812Method;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart0Ws2812xInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart0Sk6812InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Tm1814InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Tm1829InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart0Apa106InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart0800KbpsInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<UartFeature0, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart0400KbpsInvertedMethod;
@ -476,6 +493,7 @@ typedef NeoEsp8266Uart0Sk6812InvertedMethod NeoEsp8266Uart0Lc8812InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart1Ws2812xInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart1Sk6812InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Tm1814InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Tm1829InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart1Apa106InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart1800KbpsInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<UartFeature1, NeoEsp8266UartContext>, NeoEsp8266UartInverted> NeoEsp8266Uart1400KbpsInvertedMethod;
@ -489,6 +507,7 @@ typedef NeoEsp8266Uart1Sk6812InvertedMethod NeoEsp8266Uart1Lc8812InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Ws2812xInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Sk6812InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Tm1814InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Tm1829InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Apa106InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0800KbpsInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart<UartFeature0, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0400KbpsInvertedMethod;
@ -502,6 +521,7 @@ typedef NeoEsp8266AsyncUart0Sk6812InvertedMethod NeoEsp8266AsyncUart0Lc8812Inver
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedWs2812x, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Ws2812xInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedSk6812, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Sk6812InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1814, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Tm1814InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedTm1829, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Tm1829InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeedApa106, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Apa106InvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed800Kbps, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1800KbpsInvertedMethod;
typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart<UartFeature1, NeoEsp8266UartInterruptContext>, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1400KbpsInvertedMethod;

View File

@ -27,7 +27,9 @@ License along with NeoPixel. If not, see
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
#include <Arduino.h>
#include "NeoEspBitBangMethod.h"
// ESP32C3 I2S is not supported yet
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
static inline uint32_t getCycleCount(void)
{
@ -36,7 +38,7 @@ static inline uint32_t getCycleCount(void)
return ccount;
}
void ICACHE_RAM_ATTR NeoEspBitBangBase_send_pixels(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period, uint8_t IdleLevel)
void IRAM_ATTR NeoEspBitBangBase_send_pixels(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period)
{
const uint32_t pinRegister = _BV(pin);
uint8_t mask = 0x80;
@ -58,39 +60,21 @@ void ICACHE_RAM_ATTR NeoEspBitBangBase_send_pixels(uint8_t* pixels, uint8_t* end
while (((cyclesStart = getCycleCount()) - cyclesNext) < period);
// set pin state
if (IdleLevel == LOW) {
#if defined(ARDUINO_ARCH_ESP32)
GPIO.out_w1ts = pinRegister;
GPIO.out_w1ts = pinRegister;
#else
GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pinRegister);
GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pinRegister);
#endif
} else {
#if defined(ARDUINO_ARCH_ESP32)
GPIO.out_w1tc = pinRegister;
#else
GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pinRegister);
#endif
}
// T_PINSET::setPin(pinRegister);
// wait for the LOW
while ((getCycleCount() - cyclesStart) < cyclesBit);
// reset pin start
if (IdleLevel == LOW) {
#if defined(ARDUINO_ARCH_ESP32)
GPIO.out_w1tc = pinRegister;
GPIO.out_w1tc = pinRegister;
#else
GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pinRegister);
GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pinRegister);
#endif
} else {
#if defined(ARDUINO_ARCH_ESP32)
GPIO.out_w1ts = pinRegister;
#else
GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pinRegister);
#endif
}
// T_PINSET::resetPin(pinRegister);
cyclesNext = cyclesStart;
@ -112,4 +96,63 @@ void ICACHE_RAM_ATTR NeoEspBitBangBase_send_pixels(uint8_t* pixels, uint8_t* end
}
}
#endif
void IRAM_ATTR NeoEspBitBangBase_send_pixels_inv(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period)
{
const uint32_t pinRegister = _BV(pin);
uint8_t mask = 0x80;
uint8_t subpix = *pixels++;
uint32_t cyclesStart = 0; // trigger emediately
uint32_t cyclesNext = 0;
for (;;)
{
// do the checks here while we are waiting on time to pass
uint32_t cyclesBit = t0h;
if (subpix & mask)
{
cyclesBit = t1h;
}
// after we have done as much work as needed for this next bit
// now wait for the HIGH
while (((cyclesStart = getCycleCount()) - cyclesNext) < period);
// set pin state
#if defined(ARDUINO_ARCH_ESP32)
GPIO.out_w1tc = pinRegister;
#else
GPIO_REG_WRITE(GPIO_OUT_W1TC_ADDRESS, pinRegister);
#endif
// wait for the LOW
while ((getCycleCount() - cyclesStart) < cyclesBit);
// reset pin start
#if defined(ARDUINO_ARCH_ESP32)
GPIO.out_w1ts = pinRegister;
#else
GPIO_REG_WRITE(GPIO_OUT_W1TS_ADDRESS, pinRegister);
#endif
cyclesNext = cyclesStart;
// next bit
mask >>= 1;
if (mask == 0)
{
// no more bits to send in this byte
// check for another byte
if (pixels >= end)
{
// no more bytes to send so stop
break;
}
// reset mask to first bit and get the next byte
mask = 0x80;
subpix = *pixels++;
}
}
}
#endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
#endif // defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)

View File

@ -28,15 +28,13 @@ License along with NeoPixel. If not, see
#if defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)
// ESP32C3 I2S is not supported yet
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
#if defined(ARDUINO_ARCH_ESP8266)
#include <eagle_soc.h>
#endif
// ESP32 doesn't define ICACHE_RAM_ATTR
#ifndef ICACHE_RAM_ATTR
#define ICACHE_RAM_ATTR IRAM_ATTR
#endif
#define CYCLES_LOOPTEST (4) // adjustment due to loop exit test instruction cycles
class NeoEspSpeedWs2811
@ -87,26 +85,37 @@ public:
const static uint32_t Period = (F_CPU / 606061 - CYCLES_LOOPTEST); // 1.65us
};
extern void NeoEspBitBangBase_send_pixels(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period);
extern void NeoEspBitBangBase_send_pixels_inv(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period);
class NeoEspPinset
{
public:
const static uint8_t IdleLevel = LOW;
inline static void send_pixels_impl(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period)
{
NeoEspBitBangBase_send_pixels(pixels, end, pin, t0h, t1h, period);
}
};
class NeoEspPinsetInverted
{
public:
const static uint8_t IdleLevel = HIGH;
};
extern void NeoEspBitBangBase_send_pixels(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period, uint8_t IdleLevel);
inline static void send_pixels_impl(uint8_t* pixels, uint8_t* end, uint8_t pin, uint32_t t0h, uint32_t t1h, uint32_t period)
{
NeoEspBitBangBase_send_pixels_inv(pixels, end, pin, t0h, t1h, period);
}
};
template<typename T_SPEED, typename T_PINSET> class NeoEspBitBangBase
{
public:
static void send_pixels(uint8_t* pixels, uint8_t* end, uint8_t pin)
{
NeoEspBitBangBase_send_pixels(pixels, end, pin, T_SPEED::T0H, T_SPEED::T1H, T_SPEED::Period, T_PINSET::IdleLevel);
T_PINSET::send_pixels_impl(pixels, end, pin, T_SPEED::T0H, T_SPEED::T1H, T_SPEED::Period);
}
};
@ -213,6 +222,8 @@ public:
template<typename T_SPEED, typename T_PINSET> class NeoEspBitBangMethodBase
{
public:
typedef NeoNoSettings SettingsObject;
NeoEspBitBangMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_pin(pin)
@ -289,6 +300,10 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
}
private:
const size_t _sizeData; // Size of '_data' buffer below
const uint8_t _pin; // output pin number
@ -357,4 +372,6 @@ typedef NeoEsp8266BitBangSk6812InvertedMethod NeoEsp8266BitBangLc8812InvertedMet
#endif
// ESP bitbang doesn't have defaults and should avoided except for testing
#endif
#endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
#endif // defined(ARDUINO_ARCH_ESP8266) || defined(ARDUINO_ARCH_ESP32)

View File

@ -80,6 +80,17 @@ public:
const static PinStatus IdleLevel = HIGH;
};
class NeoNrf52xPwmSpeedTm1829
{
public:
const static uint32_t CountTop = 20UL; // 1.25us
const static nrf_pwm_values_common_t Bit0 = 5; // ~0.3us
const static nrf_pwm_values_common_t Bit1 = 13 | 0x8000; // ~0.8us
const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
const static PinStatus IdleLevel = HIGH;
};
class NeoNrf52xPwmSpeed800Kbps
{
public:
@ -114,6 +125,17 @@ public:
const static PinStatus IdleLevel = LOW;
};
class NeoNrf52xPwmSpeedTx1812
{
public:
const static uint32_t CountTop = 14UL; // ~0.875us (target is 0.9us)
const static nrf_pwm_values_common_t Bit0 = 5 | 0x8000; // ~0.3125us (target is 0.3)
const static nrf_pwm_values_common_t Bit1 = 10 | 0x8000; // ~0.625us (target is 0.6)
const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
const static uint32_t CountReset = 228; // 200us / 0.875us pulse width
const static PinStatus IdleLevel = LOW;
};
class NeoNrf52xPwmInvertedSpeedWs2811
{
public:
@ -158,6 +180,17 @@ public:
const static PinStatus IdleLevel = LOW;
};
class NeoNrf52xPwmInvertedSpeedTm1829
{
public:
const static uint32_t CountTop = 20UL; // 1.25us
const static nrf_pwm_values_common_t Bit0 = 5 | 0x8000; // ~0.3us
const static nrf_pwm_values_common_t Bit1 = 13; // ~0.8us
const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW
const static uint32_t CountReset = 160; // 200us / 1.25us pulse width
const static PinStatus IdleLevel = LOW;
};
class NeoNrf52xPwmInvertedSpeed800Kbps
{
public:
@ -191,9 +224,22 @@ public:
const static PinStatus IdleLevel = HIGH;
};
class NeoNrf52xPwmInvertedSpeedTx1812
{
public:
const static uint32_t CountTop = 14UL; // ~0.875us (target is 0.9us)
const static nrf_pwm_values_common_t Bit0 = 5; // ~0.3125us (target is 0.3)
const static nrf_pwm_values_common_t Bit1 = 10; // ~0.625us (target is 0.6)
const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH
const static uint32_t CountReset = 228; // 200us / 0.875us pulse width
const static PinStatus IdleLevel = HIGH;
};
class NeoNrf52xPwm0
{
public:
NeoNrf52xPwm0() {};
inline static NRF_PWM_Type* Pwm()
{
return NRF_PWM0;
@ -203,6 +249,8 @@ public:
class NeoNrf52xPwm1
{
public:
NeoNrf52xPwm1() {};
inline static NRF_PWM_Type* Pwm()
{
return NRF_PWM1;
@ -212,6 +260,8 @@ public:
class NeoNrf52xPwm2
{
public:
NeoNrf52xPwm2() {};
inline static NRF_PWM_Type* Pwm()
{
return NRF_PWM2;
@ -222,6 +272,8 @@ public:
class NeoNrf52xPwm3
{
public:
NeoNrf52xPwm3() {};
inline static NRF_PWM_Type* Pwm()
{
return NRF_PWM3;
@ -260,6 +312,8 @@ protected:
template<typename T_SPEED, typename T_BUS> class NeoNrf52xMethodBase
{
public:
typedef NeoNoSettings SettingsObject;
NeoNrf52xMethodBase(uint8_t pin, uint16_t pixelCount, size_t elementSize, size_t settingsSize) :
_sizeData(pixelCount * elementSize + settingsSize),
_pin(pin)
@ -334,6 +388,10 @@ public:
return _sizeData;
};
void applySettings(const SettingsObject& settings)
{
}
private:
const size_t _sizeData; // Size of '_data' buffer below
const uint8_t _pin; // output pin number
@ -440,6 +498,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwmN> NeoNrf52xPwm
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwmN> NeoNrf52xPwmNWs2812xMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwmN> NeoNrf52xPwmNSk6812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwmN> NeoNrf52xPwmNTm1814Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwmN> NeoNrf52xPwmNTm1829Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwmN> NeoNrf52xPwmNTx1812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwmN> NeoNrf52xPwmNApa106Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN800KbpsMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN400KbpsMethod;
@ -448,6 +508,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm0> NeoNrf52xPwm
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2812xMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm0> NeoNrf52xPwm0Sk6812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1814Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1829Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm0> NeoNrf52xPwm0Tx1812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm0> NeoNrf52xPwm0Apa106Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0800KbpsMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0400KbpsMethod;
@ -456,6 +518,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm1> NeoNrf52xPwm
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2812xMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm1> NeoNrf52xPwm1Sk6812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1814Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1829Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm1> NeoNrf52xPwm1Tx1812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm1> NeoNrf52xPwm1Apa106Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1800KbpsMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1400KbpsMethod;
@ -464,6 +528,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm2> NeoNrf52xPwm
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2812xMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm2> NeoNrf52xPwm2Sk6812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1814Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1829Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm2> NeoNrf52xPwm2Tx1812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm2> NeoNrf52xPwm2Apa106Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2800KbpsMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2400KbpsMethod;
@ -473,6 +539,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2811, NeoNrf52xPwm3> NeoNrf52xPwm
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2812xMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm3> NeoNrf52xPwm3Sk6812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1814Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1829Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm3> NeoNrf52xPwm3Tx1812Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm3> NeoNrf52xPwm3Apa106Method;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3800KbpsMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed400Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3400KbpsMethod;
@ -483,6 +551,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwmN> NeoN
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwmN> NeoNrf52xPwmNWs2812xInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwmN> NeoNrf52xPwmNSk6812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwmN> NeoNrf52xPwmNTm1814InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwmN> NeoNrf52xPwmNTm1829InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwmN> NeoNrf52xPwmNTx1812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwmN> NeoNrf52xPwmNApa106InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN800KbpsInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN400KbpsInvertedMethod;
@ -491,6 +561,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm0> NeoN
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm0> NeoNrf52xPwm0Ws2812xInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm0> NeoNrf52xPwm0Sk6812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1814InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1829InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm0> NeoNrf52xPwm0Tx1812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm0> NeoNrf52xPwm0Apa106InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0800KbpsInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0400KbpsInvertedMethod;
@ -499,6 +571,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm1> NeoN
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm1> NeoNrf52xPwm1Ws2812xInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm1> NeoNrf52xPwm1Sk6812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1814InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1829InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm1> NeoNrf52xPwm1Tx1812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm1> NeoNrf52xPwm1Apa106InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1800KbpsInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1400KbpsInvertedMethod;
@ -507,6 +581,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm2> NeoN
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm2> NeoNrf52xPwm2Ws2812xInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm2> NeoNrf52xPwm2Sk6812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1814InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1829InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm2> NeoNrf52xPwm2Tx1812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm2> NeoNrf52xPwm2Apa106InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2800KbpsInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2400KbpsInvertedMethod;
@ -516,6 +592,8 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2811, NeoNrf52xPwm3> NeoN
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm3> NeoNrf52xPwm3Ws2812xInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm3> NeoNrf52xPwm3Sk6812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1814InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1829InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm3> NeoNrf52xPwm3Tx1812InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm3> NeoNrf52xPwm3Apa106InvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3800KbpsInvertedMethod;
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed400Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3400KbpsInvertedMethod;
@ -528,6 +606,8 @@ typedef NeoNrf52xPwm2800KbpsMethod NeoWs2812Method;
typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2811Method;
typedef NeoNrf52xPwm2Sk6812Method NeoSk6812Method;
typedef NeoNrf52xPwm2Tm1814Method NeoTm1814Method;
typedef NeoNrf52xPwm2Tm1829Method NeoTm1829Method;
typedef NeoNrf52xPwm2Tx1812Method NeoTx1812Method;
typedef NeoNrf52xPwm2Sk6812Method NeoLc8812Method;
typedef NeoNrf52xPwm2Apa106Method NeoApa106Method;
@ -540,6 +620,8 @@ typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2811InvertedMethod;
typedef NeoNrf52xPwm2800KbpsInvertedMethod NeoWs2812InvertedMethod;
typedef NeoNrf52xPwm2Sk6812InvertedMethod NeoSk6812InvertedMethod;
typedef NeoNrf52xPwm2Tm1814InvertedMethod NeoTm1814InvertedMethod;
typedef NeoNrf52xPwm2Tm1829InvertedMethod NeoTm1829InvertedMethod;
typedef NeoNrf52xPwm2Tx1812InvertedMethod NeoTx1812InvertedMethod;
typedef NeoNrf52xPwm2Sk6812InvertedMethod NeoLc8812InvertedMethod;
typedef NeoNrf52xPwm2Apa106InvertedMethod NeoApa106InvertedMethod;

Some files were not shown because too many files have changed in this diff Show More