mirror of https://github.com/arendst/Tasmota.git
Neopixel v.2.6.7
This commit is contained in:
parent
b7da3ed6db
commit
d516f2a3ad
|
@ -0,0 +1,122 @@
|
|||
//----------------------------------------------------------------------
|
||||
// NeoPixelRingTopologyTest
|
||||
// This will display specific colors in specific locations on the led rings
|
||||
//
|
||||
// This is useful in confirming the layout of your rings
|
||||
//
|
||||
// It does require that you have the actual series of rings connected
|
||||
//----------------------------------------------------------------------
|
||||
|
||||
#include <NeoPixelBus.h>
|
||||
|
||||
const uint8_t PixelCount = 119;
|
||||
const uint8_t PixelPin = 2; // make sure to set this to the correct pin, ignored for Esp8266
|
||||
|
||||
// define the layout of your series of rings
|
||||
//
|
||||
// This example is using all of Adafruits rings and a Jewel in the center.
|
||||
// The center is the input and all the rings are connected in series going outward
|
||||
//
|
||||
// Rings:
|
||||
// 0 - 1 (virtual ring, the center of the jewel)
|
||||
// 1 - 6 (virtual ring, the outer ring of the jewel)
|
||||
// 2 - 12 count ring
|
||||
// 3 - 16 count ring
|
||||
// 4 - 24 count ring
|
||||
// 5 - 60 count ring comprised of four arc segments
|
||||
//
|
||||
// The values below in Rings[] are the index of the first pixel in each ring.
|
||||
// An extra value is appended for a virtual ring start that also
|
||||
// represents the total count of pixels in the complete series and this extra
|
||||
// value is required.
|
||||
//
|
||||
class MyRingsLayout
|
||||
{
|
||||
public:
|
||||
void Begin() {
|
||||
// this is where you load your dynamic rings layout and init Rings and RingCount
|
||||
// this example will just set these to static numbers to simulate a dynamic layout
|
||||
RingCount = 6;
|
||||
Rings = new uint16_t[RingCount];
|
||||
|
||||
Rings[0] = 1;
|
||||
Rings[1] = 6;
|
||||
Rings[2] = 12;
|
||||
Rings[3] = 16;
|
||||
Rings[4] = 24;
|
||||
Rings[5] = 60; // don't forget the final count of pixels as the last item
|
||||
}
|
||||
|
||||
protected:
|
||||
uint16_t* Rings;
|
||||
uint8_t RingCount;
|
||||
|
||||
uint8_t _ringCount() const
|
||||
{
|
||||
return RingCount;
|
||||
}
|
||||
};
|
||||
|
||||
// use the MyRingsLayout to declare the topo object
|
||||
//
|
||||
NeoRingTopology<MyRingsLayout> topo;
|
||||
|
||||
// declare our strip
|
||||
//
|
||||
NeoPixelBus<NeoGrbFeature, Neo800KbpsMethod> strip(PixelCount, PixelPin);
|
||||
|
||||
// define some handy colors
|
||||
//
|
||||
RgbColor red(128, 0, 0);
|
||||
RgbColor green(0, 128, 0);
|
||||
RgbColor blue(0, 0, 128);
|
||||
RgbColor black(0);
|
||||
|
||||
void setup()
|
||||
{
|
||||
Serial.begin(115200);
|
||||
while (!Serial); // wait for serial attach
|
||||
|
||||
Serial.println();
|
||||
Serial.println("Initializing...");
|
||||
|
||||
topo.Begin();
|
||||
|
||||
strip.Begin();
|
||||
strip.Show();
|
||||
|
||||
Serial.println();
|
||||
Serial.println("Running...");
|
||||
}
|
||||
|
||||
void loop()
|
||||
{
|
||||
delay(2500);
|
||||
|
||||
Serial.println();
|
||||
Serial.println("If your panel is correctly defined, you should see ...");
|
||||
Serial.println("First pixel in each ring is Red.");
|
||||
Serial.println("Middle pixel in each ring is Green.");
|
||||
Serial.println("Last Pixel in each ring is Blue.");
|
||||
|
||||
|
||||
// use the topo to map the 2d polar cordinate to the pixel
|
||||
// and use that to SetPixelColor
|
||||
for (uint16_t ring = 0; ring < topo.getCountOfRings(); ring++)
|
||||
{
|
||||
// first pixel in each ring is red
|
||||
strip.SetPixelColor(topo.Map(ring, 0), red);
|
||||
// last pixel in each ring is blue
|
||||
strip.SetPixelColor(topo.Map(ring, topo.getPixelCountAtRing(ring) - 1), blue);
|
||||
// middle pixel in each ring is green
|
||||
strip.SetPixelColor(topo.Map(ring, topo.getPixelCountAtRing(ring) / 2), green);
|
||||
}
|
||||
strip.Show();
|
||||
|
||||
delay(5000);
|
||||
|
||||
Serial.println();
|
||||
Serial.println("Cleared to black ...");
|
||||
strip.ClearTo(black);
|
||||
strip.Show();
|
||||
}
|
|
@ -34,6 +34,11 @@ class MyRingsLayout
|
|||
{
|
||||
protected:
|
||||
const uint16_t Rings[7] = {0, 1, 7, 19, 35, 59, PixelCount};
|
||||
|
||||
uint8_t _ringCount() const
|
||||
{
|
||||
return sizeof(Rings) / sizeof(Rings[0]);
|
||||
}
|
||||
};
|
||||
|
||||
// use the MyRingsLayout to declare the topo object
|
||||
|
@ -97,4 +102,3 @@ void loop()
|
|||
strip.ClearTo(black);
|
||||
strip.Show();
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@ HsbColor KEYWORD1
|
|||
HtmlColor KEYWORD1
|
||||
NeoNoSettings KEYWORD1
|
||||
NeoTm1814Settings KEYWORD1
|
||||
NeoTm1914Settings KEYWORD1
|
||||
NeoSpiSettings KEYWORD1
|
||||
NeoGrbFeature KEYWORD1
|
||||
NeoGrbwFeature KEYWORD1
|
||||
|
@ -25,6 +26,8 @@ NeoRgbFeature KEYWORD1
|
|||
NeoBrgFeature KEYWORD1
|
||||
NeoRbgFeature KEYWORD1
|
||||
NeoWrgbTm1814Feature KEYWORD1
|
||||
NeoRgbTm1914Feature KEYWORD1
|
||||
NeoGrbTm1914Feature KEYWORD1
|
||||
DotStarBgrFeature KEYWORD1
|
||||
DotStarLbgrFeature KEYWORD1
|
||||
Lpd6803GrbFeature KEYWORD1
|
||||
|
@ -43,6 +46,7 @@ NeoWs2812Method KEYWORD1
|
|||
NeoWs2811Method KEYWORD1
|
||||
NeoSk6812Method KEYWORD1
|
||||
NeoTm1814Method KEYWORD1
|
||||
NeoTm1914Method KEYWORD1
|
||||
NeoTm1829Method KEYWORD1
|
||||
NeoTx1812Method KEYWORD1
|
||||
NeoLc8812Method KEYWORD1
|
||||
|
@ -55,6 +59,7 @@ NeoWs2812InvertedMethod KEYWORD1
|
|||
NeoWs2811InvertedMethod KEYWORD1
|
||||
NeoSk6812InvertedMethod KEYWORD1
|
||||
NeoTm1814InvertedMethod KEYWORD1
|
||||
NeoTm1914InvertedMethod KEYWORD1
|
||||
NeoTm1829InvertedMethod KEYWORD1
|
||||
NeoTx1812InvertedMethod KEYWORD1
|
||||
NeoLc8812InvertedMethod KEYWORD1
|
||||
|
@ -62,6 +67,7 @@ NeoApa106InvertedMethod KEYWORD1
|
|||
NeoEsp8266DmaWs2812xMethod KEYWORD1
|
||||
NeoEsp8266DmaSk6812Method KEYWORD1
|
||||
NeoEsp8266DmaTm1814Method KEYWORD1
|
||||
NeoEsp8266DmaTm1914Method KEYWORD1
|
||||
NeoEsp8266DmaTm1829Method KEYWORD1
|
||||
NeoEsp8266DmaApa106Method KEYWORD1
|
||||
NeoEsp8266Dma800KbpsMethod KEYWORD1
|
||||
|
@ -69,6 +75,7 @@ NeoEsp8266Dma400KbpsMethod KEYWORD1
|
|||
NeoEsp8266DmaInvertedWs2812xMethod KEYWORD1
|
||||
NeoEsp8266DmaInvertedSk6812Method KEYWORD1
|
||||
NeoEsp8266DmaInvertedTm1814Method KEYWORD1
|
||||
NeoEsp8266DmaInvertedTm1914Method KEYWORD1
|
||||
NeoEsp8266DmaInvertedTm1829Method KEYWORD1
|
||||
NeoEsp8266DmaInvertedApa106Method KEYWORD1
|
||||
NeoEsp8266DmaInverted800KbpsMethod KEYWORD1
|
||||
|
@ -79,6 +86,7 @@ NeoEsp8266Uart0Ws2812Method KEYWORD1
|
|||
NeoEsp8266Uart0Ws2811Method KEYWORD1
|
||||
NeoEsp8266Uart0Sk6812Method KEYWORD1
|
||||
NeoEsp8266Uart0Tm1814Method KEYWORD1
|
||||
NeoEsp8266Uart0Tm1914Method KEYWORD1
|
||||
NeoEsp8266Uart0Tm1829Method KEYWORD1
|
||||
NeoEsp8266Uart0Lc8812Method KEYWORD1
|
||||
NeoEsp8266Uart0Apa106Method KEYWORD1
|
||||
|
@ -90,6 +98,7 @@ NeoEsp8266AsyncUart0Ws2812Method KEYWORD1
|
|||
NeoEsp8266AsyncUart0Ws2811Method KEYWORD1
|
||||
NeoEsp8266AsyncUart0Sk6812Method KEYWORD1
|
||||
NeoEsp8266AsyncUart0Tm1814Method KEYWORD1
|
||||
NeoEsp8266AsyncUart0Tm1914Method KEYWORD1
|
||||
NeoEsp8266AsyncUart0Tm1829Method KEYWORD1
|
||||
NeoEsp8266AsyncUart0Lc8812Method KEYWORD1
|
||||
NeoEsp8266AsyncUart0Apa106Method KEYWORD1
|
||||
|
@ -101,6 +110,7 @@ NeoEsp8266Uart1Ws2812Method KEYWORD1
|
|||
NeoEsp8266Uart1Ws2811Method KEYWORD1
|
||||
NeoEsp8266Uart1Sk6812Method KEYWORD1
|
||||
NeoEsp8266Uart1Tm1814 KEYWORD1
|
||||
NeoEsp8266Uart1Tm1914 KEYWORD1
|
||||
NeoEsp8266Uart1Tm1829 KEYWORD1
|
||||
NeoEsp8266Uart1Lc8812Method KEYWORD1
|
||||
NeoEsp8266Uart1Apa106Method KEYWORD1
|
||||
|
@ -112,6 +122,7 @@ NeoEsp8266AsyncUart1Ws2812Method KEYWORD1
|
|||
NeoEsp8266AsyncUart1Ws2811Method KEYWORD1
|
||||
NeoEsp8266AsyncUart1Sk6812Method KEYWORD1
|
||||
NeoEsp8266AsyncUart1Tm1814 KEYWORD1
|
||||
NeoEsp8266AsyncUart1Tm1914 KEYWORD1
|
||||
NeoEsp8266AsyncUart1Tm1829 KEYWORD1
|
||||
NeoEsp8266AsyncUart1Lc8812Method KEYWORD1
|
||||
NeoEsp8266AsyncUart1Apa106Method KEYWORD1
|
||||
|
@ -123,6 +134,7 @@ NeoEsp8266Uart0Ws2812InvertedMethod KEYWORD1
|
|||
NeoEsp8266Uart0Ws2811InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart0Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart0Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart0Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart0Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart0Lc8812InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart0Apa106InvertedMethod KEYWORD1
|
||||
|
@ -134,6 +146,7 @@ NeoEsp8266AsyncUart0Ws2812InvertedMethod KEYWORD1
|
|||
NeoEsp8266AsyncUart0Ws2811InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart0Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart0Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart0Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart0Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart0Lc8812InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart0Apa106InvertedMethod KEYWORD1
|
||||
|
@ -145,6 +158,7 @@ NeoEsp8266Uart1Ws2812InvertedMethod KEYWORD1
|
|||
NeoEsp8266Uart1Ws2811InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart1Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart1Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart1Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart1Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart1Lc8812InvertedMethod KEYWORD1
|
||||
NeoEsp8266Uart1Apa106InvertedMethod KEYWORD1
|
||||
|
@ -156,6 +170,7 @@ NeoEsp8266AsyncUart1Ws2812InvertedMethod KEYWORD1
|
|||
NeoEsp8266AsyncUart1Ws2811InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart1Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart1Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart1Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart1Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart1Lc8812InvertedMethod KEYWORD1
|
||||
NeoEsp8266AsyncUart1Apa106InvertedMethod KEYWORD1
|
||||
|
@ -167,6 +182,7 @@ NeoEsp8266BitBangWs2812Method KEYWORD1
|
|||
NeoEsp8266BitBangWs2811Method KEYWORD1
|
||||
NeoEsp8266BitBangSk6812Method KEYWORD1
|
||||
NeoEsp8266BitBangTm1814Method KEYWORD1
|
||||
NeoEsp8266BitBangTm1914Method KEYWORD1
|
||||
NeoEsp8266BitBangTm1829Method KEYWORD1
|
||||
NeoEsp8266BitBangLc8812Method KEYWORD1
|
||||
NeoEsp8266BitBangApa106Method KEYWORD1
|
||||
|
@ -178,6 +194,7 @@ NeoEsp8266BitBangWs2812InvertedMethod KEYWORD1
|
|||
NeoEsp8266BitBangWs2811InvertedMethod KEYWORD1
|
||||
NeoEsp8266BitBangSk6812InvertedMethod KEYWORD1
|
||||
NeoEsp8266BitBangTm1814InvertedMethod KEYWORD1
|
||||
NeoEsp8266BitBangTm1914InvertedMethod KEYWORD1
|
||||
NeoEsp8266BitBangTm1829InvertedMethod KEYWORD1
|
||||
NeoEsp8266BitBangLc8812InvertedMethod KEYWORD1
|
||||
NeoEsp8266BitBangApa106InvertedMethod KEYWORD1
|
||||
|
@ -186,12 +203,14 @@ NeoEsp8266BitBang400KbpsInvertedMethod KEYWORD1
|
|||
NeoEsp32I2sNWs2812xMethod KEYWORD1
|
||||
NeoEsp32I2sNSk6812Method KEYWORD1
|
||||
NeoEsp32I2sNTm1814Method KEYWORD1
|
||||
NeoEsp32I2sNTm1914Method KEYWORD1
|
||||
NeoEsp32I2sN800KbpsMethod KEYWORD1
|
||||
NeoEsp32I2sN400KbpsMethod KEYWORD1
|
||||
NeoEsp32I2sNApa106Method KEYWORD1
|
||||
NeoEsp32I2s0Ws2812xMethod KEYWORD1
|
||||
NeoEsp32I2s0Sk6812Method KEYWORD1
|
||||
NeoEsp32I2s0Tm1814Method KEYWORD1
|
||||
NeoEsp32I2s0Tm1914Method KEYWORD1
|
||||
NeoEsp32I2s0Tm1829Method KEYWORD1
|
||||
NeoEsp32I2s0800KbpsMethod KEYWORD1
|
||||
NeoEsp32I2s0400KbpsMethod KEYWORD1
|
||||
|
@ -199,6 +218,7 @@ NeoEsp32I2s0Apa106Method KEYWORD1
|
|||
NeoEsp32I2s1Ws2812xMethod KEYWORD1
|
||||
NeoEsp32I2s1Sk6812Method KEYWORD1
|
||||
NeoEsp32I2s1Tm1814Method KEYWORD1
|
||||
NeoEsp32I2s1Tm1914Method KEYWORD1
|
||||
NeoEsp32I2s1Tm1829Method KEYWORD1
|
||||
NeoEsp32I2s1800KbpsMethod KEYWORD1
|
||||
NeoEsp32I2s1400KbpsMethod KEYWORD1
|
||||
|
@ -206,12 +226,14 @@ NeoEsp32I2s1Apa106Method KEYWORD1
|
|||
NeoEsp32I2sNWs2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32I2sNSk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32I2sNTm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32I2sNTm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32I2sN800KbpsInvertedMethod KEYWORD1
|
||||
NeoEsp32I2sN400KbpsInvertedMethod KEYWORD1
|
||||
NeoEsp32I2sNApa106InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s0Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32I2s0Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s0Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s0Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s0Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s0800KbpsInvertedMethod KEYWORD1
|
||||
NeoEsp32I2s0400KbpsInvertedMethod KEYWORD1
|
||||
|
@ -219,6 +241,7 @@ NeoEsp32I2s0Apa106InvertedMethod KEYWORD1
|
|||
NeoEsp32I2s1Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32I2s1Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s1Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s1Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s1Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32I2s1800KbpsInvertedMethod KEYWORD1
|
||||
NeoEsp32I2s1400KbpsInvertedMethod KEYWORD1
|
||||
|
@ -227,6 +250,8 @@ NeoEsp32RmtNWs2811Method KEYWORD1
|
|||
NeoEsp32RmtNWs2812xMethod KEYWORD1
|
||||
NeoEsp32RmtNSk6812Method KEYWORD1
|
||||
NeoEsp32RmtNTm1814Method KEYWORD1
|
||||
NeoEsp32RmtNTm1914Method KEYWORD1
|
||||
NeoEsp32RmtNTm1829Method KEYWORD1
|
||||
NeoEsp32RmtNApa106Method KEYWORD1
|
||||
NeoEsp32RmtN800KbpsMethod KEYWORD1
|
||||
NeoEsp32RmtN400KbpsMethod KEYWORD1
|
||||
|
@ -234,6 +259,7 @@ NeoEsp32Rmt0Ws2811Method KEYWORD1
|
|||
NeoEsp32Rmt0Ws2812xMethod KEYWORD1
|
||||
NeoEsp32Rmt0Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt0Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt0Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt0Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt0Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt0800KbpsMethod KEYWORD1
|
||||
|
@ -242,7 +268,8 @@ NeoEsp32Rmt1Ws2811Method KEYWORD1
|
|||
NeoEsp32Rmt1Ws2812xMethod KEYWORD1
|
||||
NeoEsp32Rmt1Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt1Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt1Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt1Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt1Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt1Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt1800KbpsMethod KEYWORD1
|
||||
NeoEsp32Rmt1400KbpsMethod KEYWORD1
|
||||
|
@ -251,6 +278,7 @@ NeoEsp32Rmt2Ws2812xMethod KEYWORD1
|
|||
NeoEsp32Rmt2Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt2Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt2Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt2Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt2Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt2800KbpsMethod KEYWORD1
|
||||
NeoEsp32Rmt2400KbpsMethod KEYWORD1
|
||||
|
@ -258,6 +286,7 @@ NeoEsp32Rmt3Ws2811Method KEYWORD1
|
|||
NeoEsp32Rmt3Ws2812xMethod KEYWORD1
|
||||
NeoEsp32Rmt3Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt3Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt3Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt3Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt3Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt3800KbpsMethod KEYWORD1
|
||||
|
@ -266,6 +295,7 @@ NeoEsp32Rmt4Ws2811Method KEYWORD1
|
|||
NeoEsp32Rmt4Ws2812xMethod KEYWORD1
|
||||
NeoEsp32Rmt4Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt4Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt4Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt4Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt4Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt4800KbpsMethod KEYWORD1
|
||||
|
@ -274,6 +304,7 @@ NeoEsp32Rmt5Ws2811Method KEYWORD1
|
|||
NeoEsp32Rmt5Ws2812xMethod KEYWORD1
|
||||
NeoEsp32Rmt5Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt5Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt5Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt5Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt5Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt5800KbpsMethod KEYWORD1
|
||||
|
@ -282,6 +313,7 @@ NeoEsp32Rmt6Ws2811Method KEYWORD1
|
|||
NeoEsp32Rmt6Ws2812xMethod KEYWORD1
|
||||
NeoEsp32Rmt6Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt6Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt6Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt6Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt6Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt6800KbpsMethod KEYWORD1
|
||||
|
@ -290,6 +322,7 @@ NeoEsp32Rmt7Ws2811Method KEYWORD1
|
|||
NeoEsp32Rmt7Ws2812xMethod KEYWORD1
|
||||
NeoEsp32Rmt7Sk6812Method KEYWORD1
|
||||
NeoEsp32Rmt7Tm1814Method KEYWORD1
|
||||
NeoEsp32Rmt7Tm1914Method KEYWORD1
|
||||
NeoEsp32Rmt7Tm1829Method KEYWORD1
|
||||
NeoEsp32Rmt7Apa106Method KEYWORD1
|
||||
NeoEsp32Rmt7800KbpsMethod KEYWORD1
|
||||
|
@ -298,6 +331,8 @@ NeoEsp32RmtNWs2811InvertedMethod KEYWORD1
|
|||
NeoEsp32RmtNWs2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32RmtNSk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32RmtNTm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32RmtNTm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32RmtNTm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32RmtNApa106InvertedMethod KEYWORD1
|
||||
NeoEsp32RmtN800KbpsInvertedMethod KEYWORD1
|
||||
NeoEsp32RmtN400KbpsInvertedMethod KEYWORD1
|
||||
|
@ -305,6 +340,7 @@ NeoEsp32Rmt0Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt0Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt0Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt0Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt0Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt0Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt0Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt0800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -313,6 +349,7 @@ NeoEsp32Rmt1Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt1Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt1Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt1Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt1Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt1Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt1Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt1800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -321,6 +358,7 @@ NeoEsp32Rmt2Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt2Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt2Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt2Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt2Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt2Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt2Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt2800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -329,6 +367,7 @@ NeoEsp32Rmt3Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt3Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt3Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt3Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt3Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt3Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt3Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt3800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -337,6 +376,7 @@ NeoEsp32Rmt4Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt4Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt4Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt4Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt4Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt4Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt4Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt4800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -345,6 +385,7 @@ NeoEsp32Rmt5Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt5Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt5Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt5Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt5Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt5Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt5Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt5800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -353,6 +394,7 @@ NeoEsp32Rmt6Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt6Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt6Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt6Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt6Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt6Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt6Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt6800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -361,6 +403,7 @@ NeoEsp32Rmt7Ws2811InvertedMethod KEYWORD1
|
|||
NeoEsp32Rmt7Ws2812xInvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt7Sk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt7Tm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt7Tm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt7Tm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt7Apa106InvertedMethod KEYWORD1
|
||||
NeoEsp32Rmt7800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -371,6 +414,7 @@ NeoEsp32BitBangWs2812Method KEYWORD1
|
|||
NeoEsp32BitBangWs2811Method KEYWORD1
|
||||
NeoEsp32BitBangSk6812Method KEYWORD1
|
||||
NeoEsp32BitBangTm1814Method KEYWORD1
|
||||
NeoEsp32BitBangTm1914Method KEYWORD1
|
||||
NeoEsp32BitBangTm1829Method KEYWORD1
|
||||
NeoEsp32BitBangLc8812Method KEYWORD1
|
||||
NeoEsp32BitBangApa106Method KEYWORD1
|
||||
|
@ -382,6 +426,7 @@ NeoEsp32BitBangWs2812InvertedMethod KEYWORD1
|
|||
NeoEsp32BitBangWs2811InvertedMethod KEYWORD1
|
||||
NeoEsp32BitBangSk6812InvertedMethod KEYWORD1
|
||||
NeoEsp32BitBangTm1814InvertedMethod KEYWORD1
|
||||
NeoEsp32BitBangTm1914InvertedMethod KEYWORD1
|
||||
NeoEsp32BitBangTm1829InvertedMethod KEYWORD1
|
||||
NeoEsp32BitBangLc8812InvertedMethod KEYWORD1
|
||||
NeoEsp32BitBangApa106InvertedMethod KEYWORD1
|
||||
|
@ -390,6 +435,7 @@ NeoEsp32BitBang400KbpsInvertedMethod KEYWORD1
|
|||
NeoNrf52xPwmNWs2812xMethod KEYWORD1
|
||||
NeoNrf52xPwmNSk6812Method KEYWORD1
|
||||
NeoNrf52xPwmNTm1814Method KEYWORD1
|
||||
NeoNrf52xPwmNTm1914Method KEYWORD1
|
||||
NeoNrf52xPwmNTm1829Method KEYWORD1
|
||||
NeoNrf52xPwmNTx1812Method KEYWORD1
|
||||
NeoNrf52xPwmN800KbpsMethod KEYWORD1
|
||||
|
@ -398,6 +444,7 @@ NeoNrf52xPwmNApa106Method KEYWORD1
|
|||
NeoNrf52xPwm0Ws2812xMethod KEYWORD1
|
||||
NeoNrf52xPwm0Sk6812Method KEYWORD1
|
||||
NeoNrf52xPwm0Tm1814Method KEYWORD1
|
||||
NeoNrf52xPwm0Tm1914Method KEYWORD1
|
||||
NeoNrf52xPwm0Tm1829Method KEYWORD1
|
||||
NeoNrf52xPwm0Tx1812Method KEYWORD1
|
||||
NeoNrf52xPwm0800KbpsMethod KEYWORD1
|
||||
|
@ -406,6 +453,7 @@ NeoNrf52xPwm0Apa106Method KEYWORD1
|
|||
NeoNrf52xPwm1Ws2812xMethod KEYWORD1
|
||||
NeoNrf52xPwm1Sk6812Method KEYWORD1
|
||||
NeoNrf52xPwm1Tm1814Method KEYWORD1
|
||||
NeoNrf52xPwm1Tm1914Method KEYWORD1
|
||||
NeoNrf52xPwm1Tm1829Method KEYWORD1
|
||||
NeoNrf52xPwm1Tx1812Method KEYWORD1
|
||||
NeoNrf52xPwm1800KbpsMethod KEYWORD1
|
||||
|
@ -414,6 +462,7 @@ NeoNrf52xPwm1Apa106Method KEYWORD1
|
|||
NeoNrf52xPwm2Ws2812xMethod KEYWORD1
|
||||
NeoNrf52xPwm2Sk6812Method KEYWORD1
|
||||
NeoNrf52xPwm2Tm1814Method KEYWORD1
|
||||
NeoNrf52xPwm2Tm1914Method KEYWORD1
|
||||
NeoNrf52xPwm2Tm1829Method KEYWORD1
|
||||
NeoNrf52xPwm2Tx1812Method KEYWORD1
|
||||
NeoNrf52xPwm2800KbpsMethod KEYWORD1
|
||||
|
@ -422,6 +471,7 @@ NeoNrf52xPwm2Apa106Method KEYWORD1
|
|||
NeoNrf52xPwm3Ws2812xMethod KEYWORD1
|
||||
NeoNrf52xPwm3Sk6812Method KEYWORD1
|
||||
NeoNrf52xPwm3Tm1814Method KEYWORD1
|
||||
NeoNrf52xPwm3Tm1914Method KEYWORD1
|
||||
NeoNrf52xPwm3Tm1829Method KEYWORD1
|
||||
NeoNrf52xPwm3Tx1812Method KEYWORD1
|
||||
NeoNrf52xPwm3800KbpsMethod KEYWORD1
|
||||
|
@ -430,6 +480,7 @@ NeoNrf52xPwm3Apa106Method KEYWORD1
|
|||
NeoNrf52xPwmNWs2812xInvertedMethod KEYWORD1
|
||||
NeoNrf52xPwmNSk6812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwmNTm1814InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwmNTm1914InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwmNTm1829InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwmNTx1812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwmN800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -438,6 +489,7 @@ NeoNrf52xPwmNApa106InvertedMethod KEYWORD1
|
|||
NeoNrf52xPwm0Ws2812xInvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm0Sk6812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm0Tm1814InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm0Tm1914InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm0Tm1829InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm0Tx1812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm0800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -446,6 +498,7 @@ NeoNrf52xPwm0Apa106InvertedMethod KEYWORD1
|
|||
NeoNrf52xPwm1Ws2812xInvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm1Sk6812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm1Tm1814InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm1Tm1914InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm1Tm1829InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm1Tx1812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm1800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -454,6 +507,7 @@ NeoNrf52xPwm1Apa106InvertedMethod KEYWORD1
|
|||
NeoNrf52xPwm2Ws2812xInvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm2Sk6812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm2Tm1814InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm2Tm1914InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm2Tm1829InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm2Tx1812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm2800KbpsInvertedMethod KEYWORD1
|
||||
|
@ -462,6 +516,7 @@ NeoNrf52xPwm2Apa106InvertedMethod KEYWORD1
|
|||
NeoNrf52xPwm3Ws2812xInvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm3Sk6812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm3Tm1814InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm3Tm1914InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm3Tm1829InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm3Tx1812InvertedMethod KEYWORD1
|
||||
NeoNrf52xPwm3800KbpsInvertedMethod KEYWORD1
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"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.",
|
||||
"keywords": "NeoPixel, WS2811, WS2812, WS2813, SK6812, DotStar, APA102, SK9822, APA106, LPD8806, LPD6803, P9813, TM1829, TM1814, TM1914, TX1812, WS2801 RGB, RGBW",
|
||||
"description": "A library that makes controlling NeoPixels (APA106, WS2811, WS2812, WS2813, SK6812, TM1829, TM1814, TM1914, 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",
|
||||
"version": "2.6.7",
|
||||
"frameworks": "arduino",
|
||||
"platforms": "*",
|
||||
"dependencies": [
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
name=NeoPixelBus by Makuna
|
||||
version=2.6.3
|
||||
version=2.6.7
|
||||
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.
|
||||
sentence=A library that makes controlling NeoPixels (APA106, WS2811, WS2812, WS2813, SK6812, TM1829, TM1814, TM1914, 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
|
||||
|
|
|
@ -70,6 +70,12 @@ public:
|
|||
_brightness(255)
|
||||
{
|
||||
}
|
||||
|
||||
NeoPixelBrightnessBus(uint16_t countPixels, uint8_t pin, NeoBusChannel channel) :
|
||||
NeoPixelBus<T_COLOR_FEATURE, T_METHOD>(countPixels, pin, channel),
|
||||
_brightness(255)
|
||||
{
|
||||
}
|
||||
|
||||
NeoPixelBrightnessBus(uint16_t countPixels, uint8_t pinClock, uint8_t pinData) :
|
||||
NeoPixelBus<T_COLOR_FEATURE, T_METHOD>(countPixels, pinClock, pinData),
|
||||
|
|
|
@ -63,6 +63,7 @@ License along with NeoPixel. If not, see
|
|||
|
||||
#include "internal/NeoColorFeatures.h"
|
||||
#include "internal/NeoTm1814ColorFeatures.h"
|
||||
#include "internal/NeoTm1914ColorFeatures.h"
|
||||
#include "internal/DotStarColorFeatures.h"
|
||||
#include "internal/Lpd8806ColorFeatures.h"
|
||||
#include "internal/Lpd6803ColorFeatures.h"
|
||||
|
|
|
@ -224,6 +224,7 @@ typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedPropsApa106>> Ne
|
|||
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedProps800Kbps>> NeoArm800KbpsMethod;
|
||||
typedef NeoArmMethodBase<NeoArmMk20dxSpeedBase<NeoArmMk20dxSpeedProps400Kbps>> NeoArm400KbpsMethod;
|
||||
|
||||
typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod;
|
||||
|
||||
#elif defined(__MKL26Z64__) // Teensy-LC
|
||||
|
||||
|
@ -355,6 +356,7 @@ typedef NeoArmMethodBase<NeoArmMk26z64SpeedTm1814> NeoArmTm1814InvertedMethod;
|
|||
typedef NeoArmMethodBase<NeoArmMk26z64SpeedTm1829> NeoArmTm1829InvertedMethod;
|
||||
typedef NeoArmMethodBase<NeoArmMk26z64Speed800Kbps> NeoArm800KbpsMethod;
|
||||
typedef NeoArm800KbpsMethod NeoArmApa106Method;
|
||||
typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod;
|
||||
|
||||
#else
|
||||
#error "Teensy-LC: Sorry, only 48 MHz is supported, please set Tools > CPU Speed to 48 MHz"
|
||||
|
@ -505,6 +507,7 @@ typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedPropsTm1
|
|||
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedProps800Kbps>> NeoArm800KbpsMethod;
|
||||
typedef NeoArmMethodBase<NeoArmSamd21g18aSpeedBase<NeoArmSamd21g18aSpeedProps400Kbps>> NeoArm400KbpsMethod;
|
||||
typedef NeoArm400KbpsMethod NeoArmApa106Method;
|
||||
typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod;
|
||||
|
||||
#elif defined(ARDUINO_STM32_FEATHER) || defined(ARDUINO_ARCH_STM32L4) || defined(ARDUINO_ARCH_STM32F4) || defined(ARDUINO_ARCH_STM32F1)// FEATHER WICED (120MHz)
|
||||
|
||||
|
@ -695,10 +698,11 @@ public:
|
|||
|
||||
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropsWs2812x>> NeoArmWs2812xMethod;
|
||||
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropsSk6812>> NeoArmSk6812Method;
|
||||
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropstm1814>> NeoArmTm1814InvertedMethod;
|
||||
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropstm1829>> NeoArmTm1829InvertedMethod;
|
||||
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropsTm1814>> NeoArmTm1814InvertedMethod;
|
||||
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedPropsTm1829>> NeoArmTm1829InvertedMethod;
|
||||
typedef NeoArmMethodBase<NeoArmStm32SpeedBase<NeoArmStm32SpeedProps800Kbps>> NeoArm800KbpsMethod;
|
||||
typedef NeoArm800KbpsMethod NeoArmApa106Method;
|
||||
typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod;
|
||||
|
||||
#else // Other ARM architecture -- Presumed Arduino Due
|
||||
|
||||
|
@ -836,6 +840,7 @@ typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedPropsTm1829>> NeoA
|
|||
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedProps800Kbps>> NeoArm800KbpsMethod;
|
||||
typedef NeoArmMethodBase<NeoArmOtherSpeedBase<NeoArmOtherSpeedProps400Kbps>> NeoArm400KbpsMethod;
|
||||
typedef NeoArm400KbpsMethod NeoArmApa106Method;
|
||||
typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod;
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -852,8 +857,9 @@ typedef NeoArmWs2812xMethod Neo800KbpsMethod;
|
|||
#ifdef NeoArm400KbpsMethod // this is needed due to missing 400Kbps for some platforms
|
||||
typedef NeoArm400KbpsMethod Neo400KbpsMethod;
|
||||
#endif
|
||||
// there is no invert methods for arm, but the norm for TM1814 is inverted, so
|
||||
// there is no non-invert methods for arm, but the norm for TM1814 is inverted, so
|
||||
typedef NeoArmTm1814InvertedMethod NeoTm1814InvertedMethod;
|
||||
typedef NeoArmTm1914InvertedMethod NeoTm1914InvertedMethod;
|
||||
typedef NeoArmTm1829InvertedMethod NeoTm1829InvertedMethod;
|
||||
|
||||
#endif // defined(__arm__)
|
||||
|
|
|
@ -219,7 +219,7 @@ typedef NeoAvrMethodBase<NeoAvrSpeedTm1814> NeoAvrTm1814InvertedMethod;
|
|||
typedef NeoAvrMethodBase<NeoAvrSpeedTm1829> NeoAvrTm1829InvertedMethod;
|
||||
typedef NeoAvrMethodBase<NeoAvrSpeed800Kbps> NeoAvr800KbpsMethod;
|
||||
typedef NeoAvrMethodBase<NeoAvrSpeed400Kbps> NeoAvr400KbpsMethod;
|
||||
|
||||
typedef NeoAvrTm1814InvertedMethod NeoAvrTm1914InvertedMethod;
|
||||
|
||||
// AVR doesn't have alternatives yet, so there is just the default
|
||||
typedef NeoAvrWs2812xMethod NeoWs2813Method;
|
||||
|
@ -232,7 +232,9 @@ typedef NeoAvr400KbpsMethod NeoApa106Method;
|
|||
typedef NeoAvrWs2812xMethod Neo800KbpsMethod;
|
||||
typedef NeoAvr400KbpsMethod Neo400KbpsMethod;
|
||||
|
||||
// there is no non-invert methods for avr, but the norm for TM1814 is inverted, so
|
||||
typedef NeoAvrTm1814InvertedMethod NeoTm1814InvertedMethod;
|
||||
typedef NeoAvrTm1914InvertedMethod NeoTm1914InvertedMethod;
|
||||
typedef NeoAvrTm1829InvertedMethod NeoTm1829InvertedMethod;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1,30 +1,43 @@
|
|||
#pragma once
|
||||
|
||||
// For those platforms/methods that support dynamic channel setting
|
||||
//
|
||||
// ESP32 - 8 TX channels
|
||||
// ESP32S2 - 4 TX channels
|
||||
// ESP32C3 - 2 TX channels
|
||||
// NRF52840 - 3 or 4 channels (some variants only have 3)
|
||||
|
||||
enum NeoBusChannel
|
||||
{
|
||||
NeoBusChannel_0,
|
||||
NeoBusChannel_1,
|
||||
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
NeoBusChannel_2,
|
||||
|
||||
// NRF52x has only 3 or 4 channels of PWM
|
||||
#if defined(ARDUINO_ARCH_NRF52840)
|
||||
|
||||
#if defined(NRF_PWM3)
|
||||
NeoBusChannel_3
|
||||
NeoBusChannel_3,
|
||||
#endif
|
||||
|
||||
// ESP32 has either 8 or 4 channels (S2 has only 4)
|
||||
// ESP32 has either 8, 4, or 2 channels (S2 has only 4, C3 only 2)
|
||||
#elif defined(ARDUINO_ARCH_ESP32)
|
||||
|
||||
NeoBusChannel_3,
|
||||
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
NeoBusChannel_4,
|
||||
NeoBusChannel_5,
|
||||
NeoBusChannel_6,
|
||||
NeoBusChannel_7,
|
||||
#endif
|
||||
#endif // !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
|
||||
#endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
#endif // ARDUINO_ARCH_ESP32
|
||||
|
||||
NeoBusChannel_COUNT
|
||||
};
|
|
@ -61,6 +61,14 @@ public:
|
|||
const static uint16_t ResetTimeUs = 200;
|
||||
};
|
||||
|
||||
class NeoEsp32I2sSpeedTm1914
|
||||
{
|
||||
public:
|
||||
const static uint32_t I2sSampleRate = 100000;
|
||||
const static uint16_t ByteSendTimeUs = 10;
|
||||
const static uint16_t ResetTimeUs = 200;
|
||||
};
|
||||
|
||||
class NeoEsp32I2sSpeedTm1829
|
||||
{
|
||||
public:
|
||||
|
@ -161,6 +169,7 @@ public:
|
|||
yield();
|
||||
}
|
||||
|
||||
gpio_matrix_out(_pin, 0x100, false, false);
|
||||
pinMode(_pin, INPUT);
|
||||
|
||||
free(_data);
|
||||
|
@ -277,6 +286,7 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusZero, NeoEs
|
|||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Sk6812Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Tm1814Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Tm1829Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1914, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0Tm1914Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0800KbpsMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0400KbpsMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Apa106Method;
|
||||
|
@ -285,6 +295,7 @@ 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<NeoEsp32I2sSpeedTm1914, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Tm1914InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusZero, NeoEsp32I2sNotInverted> NeoEsp32I2s0Tm1829InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0800KbpsInvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusZero, NeoEsp32I2sInverted> NeoEsp32I2s0400KbpsInvertedMethod;
|
||||
|
@ -297,6 +308,7 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusOne, NeoEsp
|
|||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Sk6812Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Tm1814Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Tm1829Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1914, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Tm1914Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1800KbpsMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1400KbpsMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Apa106Method;
|
||||
|
@ -305,6 +317,7 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusOne, NeoEsp
|
|||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Sk6812InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Tm1814InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Tm1829InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1914, NeoEsp32I2sBusOne, NeoEsp32I2sNotInverted> NeoEsp32I2s1Tm1914InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1800KbpsInvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1400KbpsInvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusOne, NeoEsp32I2sInverted> NeoEsp32I2s1Apa106InvertedMethod;
|
||||
|
@ -313,6 +326,8 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusOne, NeoEsp3
|
|||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sNWs2812xMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sNSk6812Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sNTm1814Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sNTm1829Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1914, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sNTm1914Method;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sN800KbpsMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sN400KbpsMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sNApa106Method;
|
||||
|
@ -320,6 +335,8 @@ typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusN, NeoEsp32I
|
|||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedWs2812x, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sNWs2812xInvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedSk6812, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sNSk6812InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1814, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sNTm1814InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1829, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sNTm1829InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedTm1914, NeoEsp32I2sBusN, NeoEsp32I2sNotInverted> NeoEsp32I2sNTm1914InvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed800Kbps, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sN800KbpsInvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeed400Kbps, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sN400KbpsInvertedMethod;
|
||||
typedef NeoEsp32I2sMethodBase<NeoEsp32I2sSpeedApa106, NeoEsp32I2sBusN, NeoEsp32I2sInverted> NeoEsp32I2sNApa106InvertedMethod;
|
||||
|
@ -337,6 +354,7 @@ typedef NeoEsp32I2s1Ws2812xMethod NeoWs2811Method;
|
|||
typedef NeoEsp32I2s1Sk6812Method NeoSk6812Method;
|
||||
typedef NeoEsp32I2s1Tm1814Method NeoTm1814Method;
|
||||
typedef NeoEsp32I2s1Tm1829Method NeoTm1829Method;
|
||||
typedef NeoEsp32I2s1Tm1914Method NeoTm1914Method;
|
||||
typedef NeoEsp32I2s1Sk6812Method NeoLc8812Method;
|
||||
typedef NeoEsp32I2s1Apa106Method NeoApa106Method;
|
||||
|
||||
|
@ -350,6 +368,7 @@ typedef NeoEsp32I2s1800KbpsInvertedMethod NeoWs2812InvertedMethod;
|
|||
typedef NeoEsp32I2s1Sk6812InvertedMethod NeoSk6812InvertedMethod;
|
||||
typedef NeoEsp32I2s1Tm1814InvertedMethod NeoTm1814InvertedMethod;
|
||||
typedef NeoEsp32I2s1Tm1829InvertedMethod NeoTm1829InvertedMethod;
|
||||
typedef NeoEsp32I2s1Tm1914InvertedMethod NeoTm1914InvertedMethod;
|
||||
typedef NeoEsp32I2s1Sk6812InvertedMethod NeoLc8812InvertedMethod;
|
||||
typedef NeoEsp32I2s1Apa106InvertedMethod NeoApa106InvertedMethod;
|
||||
|
||||
|
|
|
@ -153,6 +153,28 @@ void NeoEsp32RmtSpeedTm1814::Translate(const void* src,
|
|||
RmtBit0, RmtBit1, RmtDurationReset);
|
||||
}
|
||||
|
||||
void NeoEsp32RmtSpeedTm1829::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 NeoEsp32RmtSpeedTm1914::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 NeoEsp32RmtSpeed800Kbps::Translate(const void* src,
|
||||
rmt_item32_t* dest,
|
||||
size_t src_size,
|
||||
|
@ -241,6 +263,28 @@ void NeoEsp32RmtInvertedSpeedTm1814::Translate(const void* src,
|
|||
RmtBit0, RmtBit1, RmtDurationReset);
|
||||
}
|
||||
|
||||
void NeoEsp32RmtInvertedSpeedTm1829::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 NeoEsp32RmtInvertedSpeedTm1914::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 NeoEsp32RmtInvertedSpeed800Kbps::Translate(const void* src,
|
||||
rmt_item32_t* dest,
|
||||
size_t src_size,
|
||||
|
|
|
@ -184,6 +184,22 @@ public:
|
|||
size_t* item_num);
|
||||
};
|
||||
|
||||
// normal is inverted signal
|
||||
class NeoEsp32RmtSpeedTm1914 : public NeoEsp32RmtInvertedSpeedBase
|
||||
{
|
||||
public:
|
||||
const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(360, 890);
|
||||
const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(720, 530);
|
||||
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:
|
||||
|
@ -321,6 +337,22 @@ public:
|
|||
size_t* item_num);
|
||||
};
|
||||
|
||||
// normal is inverted signal
|
||||
class NeoEsp32RmtInvertedSpeedTm1914 : public NeoEsp32RmtSpeedBase
|
||||
{
|
||||
public:
|
||||
const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(360, 890);
|
||||
const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(720, 530);
|
||||
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:
|
||||
|
@ -490,6 +522,9 @@ public:
|
|||
|
||||
ESP_ERROR_CHECK(rmt_driver_uninstall(_channel.RmtChannelNumber));
|
||||
|
||||
gpio_matrix_out(_pin, 0x100, false, false);
|
||||
pinMode(_pin, INPUT);
|
||||
|
||||
free(_dataEditing);
|
||||
free(_dataSending);
|
||||
}
|
||||
|
@ -502,7 +537,7 @@ public:
|
|||
|
||||
void Initialize()
|
||||
{
|
||||
rmt_config_t config;
|
||||
rmt_config_t config = {};
|
||||
|
||||
config.rmt_mode = RMT_MODE_TX;
|
||||
config.channel = _channel.RmtChannelNumber;
|
||||
|
@ -585,6 +620,8 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannelN> NeoEs
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2812xMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannelN> NeoEsp32RmtNSk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannelN> NeoEsp32RmtNApa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannelN> NeoEsp32RmtNTx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN800KbpsMethod;
|
||||
|
@ -595,6 +632,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel0> NeoE
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Sk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel0> NeoEsp32Rmt0Apa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0800KbpsMethod;
|
||||
|
@ -605,16 +643,20 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel1> NeoE
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Sk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel1> NeoEsp32Rmt1Apa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1800KbpsMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1400KbpsMethod;
|
||||
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2811, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2811Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2812xMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Sk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel2> NeoEsp32Rmt2Apa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2800KbpsMethod;
|
||||
|
@ -625,19 +667,20 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel3> NeoE
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Sk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1914Method;
|
||||
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) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
// (RMT_CHANNEL_MAX == 8)
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
|
||||
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<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel4> NeoEsp32Rmt4Apa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4800KbpsMethod;
|
||||
|
@ -648,6 +691,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel5> NeoE
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Sk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel5> NeoEsp32Rmt5Apa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5800KbpsMethod;
|
||||
|
@ -658,6 +702,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel6> NeoE
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Sk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel6> NeoEsp32Rmt6Apa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6800KbpsMethod;
|
||||
|
@ -668,18 +713,22 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedWs2812x, NeoEsp32RmtChannel7> NeoE
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedSk6812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Sk6812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1814, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1814Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1829, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1829Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTm1914, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1914Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedApa106, NeoEsp32RmtChannel7> NeoEsp32Rmt7Apa106Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeedTx1812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tx1812Method;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed800Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7800KbpsMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtSpeed400Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7400KbpsMethod;
|
||||
|
||||
#endif
|
||||
#endif // !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
#endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
// inverted
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2811InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannelN> NeoEsp32RmtNWs2812xInvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannelN> NeoEsp32RmtNSk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannelN> NeoEsp32RmtNTm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannelN> NeoEsp32RmtNApa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannelN> NeoEsp32RmtNTx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannelN> NeoEsp32RmtN800KbpsInvertedMethod;
|
||||
|
@ -690,6 +739,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChanne
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Sk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel0> NeoEsp32Rmt0Apa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel0> NeoEsp32Rmt0Tx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel0> NeoEsp32Rmt0800KbpsInvertedMethod;
|
||||
|
@ -700,16 +750,20 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChanne
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Sk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel1> NeoEsp32Rmt1Apa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel1> NeoEsp32Rmt1Tx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1800KbpsInvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel1> NeoEsp32Rmt1400KbpsInvertedMethod;
|
||||
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2811, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2811InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChannel2> NeoEsp32Rmt2Ws2812xInvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Sk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel2> NeoEsp32Rmt2Apa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel2> NeoEsp32Rmt2Tx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel2> NeoEsp32Rmt2800KbpsInvertedMethod;
|
||||
|
@ -720,19 +774,20 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChanne
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel3> NeoEsp32Rmt3Sk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel3> NeoEsp32Rmt3Tm1914InvertedMethod;
|
||||
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) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
// (RMT_CHANNEL_MAX == 8)
|
||||
#if !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
|
||||
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<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel4> NeoEsp32Rmt4Apa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel4> NeoEsp32Rmt4Tx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel4> NeoEsp32Rmt4800KbpsInvertedMethod;
|
||||
|
@ -743,6 +798,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChanne
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Sk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel5> NeoEsp32Rmt5Apa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel5> NeoEsp32Rmt5Tx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel5> NeoEsp32Rmt5800KbpsInvertedMethod;
|
||||
|
@ -753,6 +809,7 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChanne
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Sk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel6> NeoEsp32Rmt6Apa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel6> NeoEsp32Rmt6Tx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel6> NeoEsp32Rmt6800KbpsInvertedMethod;
|
||||
|
@ -763,21 +820,57 @@ typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedWs2812x, NeoEsp32RmtChanne
|
|||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedSk6812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Sk6812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1814, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1814InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1829, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1829InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTm1914, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tm1914InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedApa106, NeoEsp32RmtChannel7> NeoEsp32Rmt7Apa106InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeedTx1812, NeoEsp32RmtChannel7> NeoEsp32Rmt7Tx1812InvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed800Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7800KbpsInvertedMethod;
|
||||
typedef NeoEsp32RmtMethodBase<NeoEsp32RmtInvertedSpeed400Kbps, NeoEsp32RmtChannel7> NeoEsp32Rmt7400KbpsInvertedMethod;
|
||||
|
||||
#endif
|
||||
#endif // !defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
#endif // !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
|
||||
#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)
|
||||
#if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
// RMT channel 1 method is the default method for Esp32S2 & Esp32C3
|
||||
typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2813Method;
|
||||
typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2812xMethod;
|
||||
typedef NeoEsp32Rmt1800KbpsMethod NeoWs2812Method;
|
||||
typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2811Method;
|
||||
typedef NeoEsp32Rmt1Sk6812Method NeoSk6812Method;
|
||||
typedef NeoEsp32Rmt1Tm1814Method NeoTm1814Method;
|
||||
typedef NeoEsp32Rmt1Tm1829Method NeoTm1829Method;
|
||||
typedef NeoEsp32Rmt1Tm1914Method NeoTm1914Method;
|
||||
typedef NeoEsp32Rmt1Sk6812Method NeoLc8812Method;
|
||||
typedef NeoEsp32Rmt1Apa106Method NeoApa106Method;
|
||||
typedef NeoEsp32Rmt1Tx1812Method NeoTx1812Method;
|
||||
|
||||
typedef NeoEsp32Rmt1Ws2812xMethod Neo800KbpsMethod;
|
||||
typedef NeoEsp32Rmt1400KbpsMethod Neo400KbpsMethod;
|
||||
|
||||
typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2813InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2812xInvertedMethod;
|
||||
typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2811InvertedMethod;
|
||||
typedef NeoEsp32Rmt1800KbpsInvertedMethod NeoWs2812InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Sk6812InvertedMethod NeoSk6812InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Tm1814InvertedMethod NeoTm1814InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Tm1829InvertedMethod NeoTm1829InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Tm1914InvertedMethod NeoTm1914InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Sk6812InvertedMethod NeoLc8812InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Apa106InvertedMethod NeoApa106InvertedMethod;
|
||||
typedef NeoEsp32Rmt1Tx1812InvertedMethod NeoTx1812InvertedMethod;
|
||||
|
||||
typedef NeoEsp32Rmt1Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
|
||||
typedef NeoEsp32Rmt1400KbpsInvertedMethod Neo400KbpsInvertedMethod;
|
||||
|
||||
#else // defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
// RMT channel 6 method is the default method for Esp32
|
||||
typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2813Method;
|
||||
typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2812xMethod;
|
||||
|
@ -786,6 +879,7 @@ typedef NeoEsp32Rmt6Ws2812xMethod NeoWs2811Method;
|
|||
typedef NeoEsp32Rmt6Sk6812Method NeoSk6812Method;
|
||||
typedef NeoEsp32Rmt6Tm1814Method NeoTm1814Method;
|
||||
typedef NeoEsp32Rmt6Tm1829Method NeoTm1829Method;
|
||||
typedef NeoEsp32Rmt6Tm1914Method NeoTm1914Method;
|
||||
typedef NeoEsp32Rmt6Sk6812Method NeoLc8812Method;
|
||||
typedef NeoEsp32Rmt6Apa106Method NeoApa106Method;
|
||||
typedef NeoEsp32Rmt6Tx1812Method NeoTx1812Method;
|
||||
|
@ -800,45 +894,16 @@ typedef NeoEsp32Rmt6800KbpsInvertedMethod NeoWs2812InvertedMethod;
|
|||
typedef NeoEsp32Rmt6Sk6812InvertedMethod NeoSk6812InvertedMethod;
|
||||
typedef NeoEsp32Rmt6Tm1814InvertedMethod NeoTm1814InvertedMethod;
|
||||
typedef NeoEsp32Rmt6Tm1829InvertedMethod NeoTm1829InvertedMethod;
|
||||
typedef NeoEsp32Rmt6Tm1914InvertedMethod NeoTm1914InvertedMethod;
|
||||
typedef NeoEsp32Rmt6Sk6812InvertedMethod NeoLc8812InvertedMethod;
|
||||
typedef NeoEsp32Rmt6Apa106InvertedMethod NeoApa106InvertedMethod;
|
||||
typedef NeoEsp32Rmt6Tx1812InvertedMethod NeoTx1812InvertedMethod;
|
||||
|
||||
typedef NeoEsp32Rmt6Ws2812xInvertedMethod Neo800KbpsInvertedMethod;
|
||||
typedef NeoEsp32Rmt6400KbpsInvertedMethod Neo400KbpsInvertedMethod;
|
||||
#else // !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
// 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;
|
||||
#endif // defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
typedef NeoEsp32Rmt3Ws2812xMethod Neo800KbpsMethod;
|
||||
typedef NeoEsp32Rmt3400KbpsMethod Neo400KbpsMethod;
|
||||
|
||||
typedef NeoEsp32Rmt3Ws2812xInvertedMethod NeoWs2813InvertedMethod;
|
||||
typedef NeoEsp32Rmt3Ws2812xInvertedMethod NeoWs2812xInvertedMethod;
|
||||
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 // !defined(CONFIG_IDF_TARGET_ESP32S2) && !defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
#endif // defined(NEOPIXEL_ESP32_RMT_DEFAULT)
|
||||
#endif // defined(NEOPIXEL_ESP32_RMT_DEFAULT) || defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32C3)
|
||||
|
||||
#endif
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
/*-------------------------------------------------------------------------
|
||||
NeoPixel library helper functions for Esp8266.
|
||||
|
||||
Written by Michael C. Miller.
|
||||
|
||||
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/>.
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
#include <Arduino.h>
|
||||
#include "NeoSettings.h"
|
||||
#include "NeoBusChannel.h"
|
||||
#include "NeoEsp8266DmaMethod.h"
|
||||
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
|
||||
NeoEsp8266DmaMethodCore* NeoEsp8266DmaMethodCore::s_this;
|
||||
|
||||
#endif
|
|
@ -32,12 +32,15 @@ License along with NeoPixel. If not, see
|
|||
|
||||
#ifdef ARDUINO_ARCH_ESP8266
|
||||
|
||||
#include "Arduino.h"
|
||||
|
||||
extern "C"
|
||||
{
|
||||
#include "Arduino.h"
|
||||
#include "osapi.h"
|
||||
#include "ets_sys.h"
|
||||
|
||||
#include "i2s_reg.h"
|
||||
|
||||
#ifdef ARDUINO_ESP8266_MAJOR //this define was added in ESP8266 Arduino Core version v3.0.1
|
||||
#include "core_esp8266_i2s.h" //for Arduino core >= 3.0.1
|
||||
#else
|
||||
|
@ -230,7 +233,72 @@ const uint16_t c_maxDmaBlockSize = 4095;
|
|||
const uint16_t c_dmaBytesPerPixelBytes = 4;
|
||||
const uint8_t c_I2sPin = 3; // due to I2S hardware, the pin used is restricted to this
|
||||
|
||||
template<typename T_SPEED> class NeoEsp8266DmaMethodBase
|
||||
class NeoEsp8266DmaMethodCore
|
||||
{
|
||||
protected:
|
||||
static NeoEsp8266DmaMethodCore* s_this; // for the ISR
|
||||
|
||||
volatile NeoDmaState _dmaState;
|
||||
|
||||
slc_queue_item* _i2sBufDesc; // dma block descriptors
|
||||
uint16_t _i2sBufDescCount; // count of block descriptors in _i2sBufDesc
|
||||
|
||||
|
||||
// This routine is called as soon as the DMA routine has something to tell us. All we
|
||||
// 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 IRAM_ATTR i2s_slc_isr(void)
|
||||
{
|
||||
ETS_SLC_INTR_DISABLE();
|
||||
|
||||
uint32_t slc_intr_status = SLCIS;
|
||||
|
||||
SLCIC = 0xFFFFFFFF;
|
||||
|
||||
if ((slc_intr_status & SLCIRXEOF) && s_this)
|
||||
{
|
||||
switch (s_this->_dmaState)
|
||||
{
|
||||
case NeoDmaState_Idle:
|
||||
break;
|
||||
|
||||
case NeoDmaState_Pending:
|
||||
{
|
||||
slc_queue_item* finished_item = (slc_queue_item*)SLCRXEDA;
|
||||
|
||||
// data block has pending data waiting to send, prepare it
|
||||
// point last state block to top
|
||||
(finished_item + 1)->next_link_ptr = s_this->_i2sBufDesc;
|
||||
|
||||
s_this->_dmaState = NeoDmaState_Sending;
|
||||
}
|
||||
break;
|
||||
|
||||
case NeoDmaState_Sending:
|
||||
{
|
||||
slc_queue_item* finished_item = (slc_queue_item*)SLCRXEDA;
|
||||
|
||||
// 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 = finished_item;
|
||||
|
||||
s_this->_dmaState = NeoDmaState_Zeroing;
|
||||
}
|
||||
break;
|
||||
|
||||
case NeoDmaState_Zeroing:
|
||||
s_this->_dmaState = NeoDmaState_Idle;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ETS_SLC_INTR_ENABLE();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename T_SPEED> class NeoEsp8266DmaMethodBase : NeoEsp8266DmaMethodCore
|
||||
{
|
||||
public:
|
||||
typedef NeoNoSettings SettingsObject;
|
||||
|
@ -436,8 +504,6 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
static NeoEsp8266DmaMethodBase* s_this; // for the ISR
|
||||
|
||||
const size_t _sizeData; // Size of '_data' buffer
|
||||
uint8_t* _data; // Holds LED color values
|
||||
|
||||
|
@ -449,64 +515,8 @@ private:
|
|||
// buffer size = (24 * (reset time / 50)) / 6
|
||||
uint8_t _i2sZeroes[(24L * (T_SPEED::ResetTimeUs / 50L)) / 6L];
|
||||
|
||||
slc_queue_item* _i2sBufDesc; // dma block descriptors
|
||||
uint16_t _i2sBufDescCount; // count of block descriptors in _i2sBufDesc
|
||||
uint16_t _is2BufMaxBlockSize; // max size based on size of a pixel of a single block
|
||||
|
||||
volatile NeoDmaState _dmaState;
|
||||
|
||||
// This routine is called as soon as the DMA routine has something to tell us. All we
|
||||
// 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 IRAM_ATTR i2s_slc_isr(void)
|
||||
{
|
||||
ETS_SLC_INTR_DISABLE();
|
||||
|
||||
uint32_t slc_intr_status = SLCIS;
|
||||
|
||||
SLCIC = 0xFFFFFFFF;
|
||||
|
||||
if ((slc_intr_status & SLCIRXEOF) && s_this)
|
||||
{
|
||||
switch (s_this->_dmaState)
|
||||
{
|
||||
case NeoDmaState_Idle:
|
||||
break;
|
||||
|
||||
case NeoDmaState_Pending:
|
||||
{
|
||||
slc_queue_item* finished_item = (slc_queue_item*)SLCRXEDA;
|
||||
|
||||
// data block has pending data waiting to send, prepare it
|
||||
// point last state block to top
|
||||
(finished_item + 1)->next_link_ptr = s_this->_i2sBufDesc;
|
||||
|
||||
s_this->_dmaState = NeoDmaState_Sending;
|
||||
}
|
||||
break;
|
||||
|
||||
case NeoDmaState_Sending:
|
||||
{
|
||||
slc_queue_item* finished_item = (slc_queue_item*)SLCRXEDA;
|
||||
|
||||
// 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 = finished_item;
|
||||
|
||||
s_this->_dmaState = NeoDmaState_Zeroing;
|
||||
}
|
||||
break;
|
||||
|
||||
case NeoDmaState_Zeroing:
|
||||
s_this->_dmaState = NeoDmaState_Idle;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ETS_SLC_INTR_ENABLE();
|
||||
}
|
||||
|
||||
void FillBuffers()
|
||||
{
|
||||
|
@ -548,23 +558,24 @@ private:
|
|||
};
|
||||
|
||||
|
||||
template<typename T_SPEED>
|
||||
NeoEsp8266DmaMethodBase<T_SPEED>* NeoEsp8266DmaMethodBase<T_SPEED>::s_this;
|
||||
|
||||
// normal
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedWs2812x> NeoEsp8266DmaWs2812xMethod;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedSk6812> NeoEsp8266DmaSk6812Method;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedTm1814> NeoEsp8266DmaTm1814Method;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedTm1829> NeoEsp8266DmaTm1829Method;
|
||||
typedef NeoEsp8266DmaTm1814Method NeoEsp8266DmaTm1914Method;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeed800Kbps> NeoEsp8266Dma800KbpsMethod;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeed400Kbps> NeoEsp8266Dma400KbpsMethod;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaSpeedApa106> NeoEsp8266DmaApa106Method;
|
||||
|
||||
|
||||
// inverted
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedWs2812x> NeoEsp8266DmaInvertedWs2812xMethod;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedSk6812> NeoEsp8266DmaInvertedSk6812Method;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedTm1814> NeoEsp8266DmaInvertedTm1814Method;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedTm1829> NeoEsp8266DmaInvertedTm1829Method;
|
||||
typedef NeoEsp8266DmaInvertedTm1814Method NeoEsp8266DmaInvertedTm1914Method;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeed800Kbps> NeoEsp8266DmaInverted800KbpsMethod;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeed400Kbps> NeoEsp8266DmaInverted400KbpsMethod;
|
||||
typedef NeoEsp8266DmaMethodBase<NeoEsp8266DmaInvertedSpeedApa106> NeoEsp8266DmaInvertedApa106Method;
|
||||
|
@ -577,6 +588,7 @@ typedef NeoEsp8266DmaWs2812xMethod NeoWs2811Method;
|
|||
typedef NeoEsp8266DmaSk6812Method NeoSk6812Method;
|
||||
typedef NeoEsp8266DmaTm1814Method NeoTm1814Method;
|
||||
typedef NeoEsp8266DmaTm1829Method NeoTm1829Method;
|
||||
typedef NeoEsp8266DmaTm1914Method NeoTm1914Method;
|
||||
typedef NeoEsp8266DmaSk6812Method NeoLc8812Method;
|
||||
typedef NeoEsp8266DmaApa106Method NeoApa106Method;
|
||||
|
||||
|
@ -591,6 +603,7 @@ typedef NeoEsp8266DmaInvertedWs2812xMethod NeoWs2811InvertedMethod;
|
|||
typedef NeoEsp8266DmaInvertedSk6812Method NeoSk6812InvertedMethod;
|
||||
typedef NeoEsp8266DmaInvertedTm1814Method NeoTm1814InvertedMethod;
|
||||
typedef NeoEsp8266DmaInvertedTm1829Method NeoTm1829InvertedMethod;
|
||||
typedef NeoEsp8266DmaInvertedTm1914Method NeoTm1914InvertedMethod;
|
||||
typedef NeoEsp8266DmaInvertedSk6812Method NeoLc8812InvertedMethod;
|
||||
typedef NeoEsp8266DmaInvertedApa106Method NeoApa106InvertedMethod;
|
||||
|
||||
|
|
|
@ -429,6 +429,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<Uart
|
|||
typedef NeoEsp8266Uart0Ws2812xMethod NeoEsp8266Uart0Ws2813Method;
|
||||
typedef NeoEsp8266Uart0800KbpsMethod NeoEsp8266Uart0Ws2812Method;
|
||||
typedef NeoEsp8266Uart0Ws2812xMethod NeoEsp8266Uart0Ws2811Method;
|
||||
typedef NeoEsp8266Uart0Tm1814Method NeoEsp8266Uart0Tm1914Method;
|
||||
typedef NeoEsp8266Uart0Sk6812Method NeoEsp8266Uart0Lc8812Method;
|
||||
|
||||
// uart 1
|
||||
|
@ -443,6 +444,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<Uart
|
|||
typedef NeoEsp8266Uart1Ws2812xMethod NeoEsp8266Uart1Ws2813Method;
|
||||
typedef NeoEsp8266Uart1800KbpsMethod NeoEsp8266Uart1Ws2812Method;
|
||||
typedef NeoEsp8266Uart1Ws2812xMethod NeoEsp8266Uart1Ws2811Method;
|
||||
typedef NeoEsp8266Uart1Tm1814Method NeoEsp8266Uart1Tm1914Method;
|
||||
typedef NeoEsp8266Uart1Sk6812Method NeoEsp8266Uart1Lc8812Method;
|
||||
|
||||
// uart 0 async
|
||||
|
@ -457,6 +459,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart
|
|||
typedef NeoEsp8266AsyncUart0Ws2812xMethod NeoEsp8266AsyncUart0Ws2813Method;
|
||||
typedef NeoEsp8266AsyncUart0800KbpsMethod NeoEsp8266AsyncUart0Ws2812Method;
|
||||
typedef NeoEsp8266AsyncUart0Ws2812xMethod NeoEsp8266AsyncUart0Ws2811Method;
|
||||
typedef NeoEsp8266AsyncUart0Tm1814Method NeoEsp8266AsyncUart0Tm1914Method;
|
||||
typedef NeoEsp8266AsyncUart0Sk6812Method NeoEsp8266AsyncUart0Lc8812Method;
|
||||
|
||||
// uart 1 async
|
||||
|
@ -471,6 +474,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart
|
|||
typedef NeoEsp8266AsyncUart1Ws2812xMethod NeoEsp8266AsyncUart1Ws2813Method;
|
||||
typedef NeoEsp8266AsyncUart1800KbpsMethod NeoEsp8266AsyncUart1Ws2812Method;
|
||||
typedef NeoEsp8266AsyncUart1Ws2812xMethod NeoEsp8266AsyncUart1Ws2811Method;
|
||||
typedef NeoEsp8266AsyncUart1Tm1814Method NeoEsp8266AsyncUart1Tm1914Method;
|
||||
typedef NeoEsp8266AsyncUart1Sk6812Method NeoEsp8266AsyncUart1Lc8812Method;
|
||||
|
||||
// inverted
|
||||
|
@ -487,6 +491,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<Uart
|
|||
typedef NeoEsp8266Uart0Ws2812xInvertedMethod NeoEsp8266Uart0Ws2813InvertedMethod;
|
||||
typedef NeoEsp8266Uart0800KbpsInvertedMethod NeoEsp8266Uart0Ws2812InvertedMethod;
|
||||
typedef NeoEsp8266Uart0Ws2812xInvertedMethod NeoEsp8266Uart0Ws2811InvertedMethod;
|
||||
typedef NeoEsp8266Uart0Tm1814InvertedMethod NeoEsp8266Uart0Tm1914InvertedMethod;
|
||||
typedef NeoEsp8266Uart0Sk6812InvertedMethod NeoEsp8266Uart0Lc8812InvertedMethod;
|
||||
|
||||
// uart 1
|
||||
|
@ -501,6 +506,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266Uart<Uart
|
|||
typedef NeoEsp8266Uart1Ws2812xInvertedMethod NeoEsp8266Uart1Ws2813InvertedMethod;
|
||||
typedef NeoEsp8266Uart1800KbpsInvertedMethod NeoEsp8266Uart1Ws2812InvertedMethod;
|
||||
typedef NeoEsp8266Uart1Ws2812xInvertedMethod NeoEsp8266Uart1Ws2811InvertedMethod;
|
||||
typedef NeoEsp8266Uart1Tm1814InvertedMethod NeoEsp8266Uart1Tm1914InvertedMethod;
|
||||
typedef NeoEsp8266Uart1Sk6812InvertedMethod NeoEsp8266Uart1Lc8812InvertedMethod;
|
||||
|
||||
// uart 0 async
|
||||
|
@ -515,6 +521,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart
|
|||
typedef NeoEsp8266AsyncUart0Ws2812xInvertedMethod NeoEsp8266AsyncUart0Ws2813InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart0800KbpsInvertedMethod NeoEsp8266AsyncUart0Ws2812InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart0Ws2812xInvertedMethod NeoEsp8266AsyncUart0Ws2811InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart0Tm1814InvertedMethod NeoEsp8266AsyncUart0Tm1914InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart0Sk6812InvertedMethod NeoEsp8266AsyncUart0Lc8812InvertedMethod;
|
||||
|
||||
// uart 1 async
|
||||
|
@ -529,6 +536,7 @@ typedef NeoEsp8266UartMethodBase<NeoEsp8266UartSpeed400Kbps, NeoEsp8266AsyncUart
|
|||
typedef NeoEsp8266AsyncUart1Ws2812xInvertedMethod NeoEsp8266AsyncUart1Ws2813InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart1800KbpsInvertedMethod NeoEsp8266AsyncUart1Ws2812InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart1Ws2812xInvertedMethod NeoEsp8266AsyncUart1Ws2811InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart1Tm1814InvertedMethod NeoEsp8266AsyncUart1Tm1914InvertedMethod;
|
||||
typedef NeoEsp8266AsyncUart1Sk6812InvertedMethod NeoEsp8266AsyncUart1Lc8812InvertedMethod;
|
||||
#endif
|
||||
|
||||
|
|
|
@ -326,6 +326,7 @@ typedef NeoEspBitBangMethodBase<NeoEspBitBangSpeedApa106, NeoEspPinset> NeoEsp32
|
|||
|
||||
typedef NeoEsp32BitBangWs2812xMethod NeoEsp32BitBangWs2813Method;
|
||||
typedef NeoEsp32BitBang800KbpsMethod NeoEsp32BitBangWs2812Method;
|
||||
typedef NeoEsp32BitBangTm1814Method NeoEsp32BitBangTm1914Method;
|
||||
typedef NeoEsp32BitBangSk6812Method NeoEsp32BitBangLc8812Method;
|
||||
|
||||
typedef NeoEspBitBangMethodBase<NeoEspBitBangInvertedSpeedWs2811, NeoEspPinsetInverted> NeoEsp32BitBangWs2811InvertedMethod;
|
||||
|
@ -339,6 +340,7 @@ typedef NeoEspBitBangMethodBase<NeoEspBitBangInvertedSpeedApa106, NeoEspPinsetIn
|
|||
|
||||
typedef NeoEsp32BitBangWs2812xInvertedMethod NeoEsp32BitBangWs2813InvertedMethod;
|
||||
typedef NeoEsp32BitBang800KbpsInvertedMethod NeoEsp32BitBangWs2812InvertedMethod;
|
||||
typedef NeoEsp32BitBangTm1814InvertedMethod NeoEsp32BitBangTm1914InvertedMethod;
|
||||
typedef NeoEsp32BitBangSk6812InvertedMethod NeoEsp32BitBangLc8812InvertedMethod;
|
||||
|
||||
#else
|
||||
|
@ -354,6 +356,7 @@ typedef NeoEspBitBangMethodBase<NeoEspBitBangSpeedApa106, NeoEspPinset> NeoEsp82
|
|||
|
||||
typedef NeoEsp8266BitBangWs2812xMethod NeoEsp8266BitBangWs2813Method;
|
||||
typedef NeoEsp8266BitBang800KbpsMethod NeoEsp8266BitBangWs2812Method;
|
||||
typedef NeoEsp8266BitBangTm1814Method NeoEsp8266BitBangTm1914Method;
|
||||
typedef NeoEsp8266BitBangSk6812Method NeoEsp8266BitBangLc8812Method;
|
||||
|
||||
typedef NeoEspBitBangMethodBase<NeoEspBitBangInvertedSpeedWs2811, NeoEspPinsetInverted> NeoEsp8266BitBangWs2811InvertedMethod;
|
||||
|
@ -367,6 +370,7 @@ typedef NeoEspBitBangMethodBase<NeoEspBitBangInvertedSpeedApa106, NeoEspPinsetIn
|
|||
|
||||
typedef NeoEsp8266BitBangWs2812xInvertedMethod NeoEsp8266BitBangWs2813InvertedMethod;
|
||||
typedef NeoEsp8266BitBang800KbpsInvertedMethod NeoEsp8266BitBangWs2812InvertedMethod;
|
||||
typedef NeoEsp8266BitBangTm1814InvertedMethod NeoEsp8266BitBangTm1914InvertedMethod;
|
||||
typedef NeoEsp8266BitBangSk6812InvertedMethod NeoEsp8266BitBangLc8812InvertedMethod;
|
||||
|
||||
#endif
|
||||
|
|
|
@ -91,6 +91,17 @@ public:
|
|||
const static PinStatus IdleLevel = HIGH;
|
||||
};
|
||||
|
||||
class NeoNrf52xPwmSpeedTm1914
|
||||
{
|
||||
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 = 12; // ~0.7us
|
||||
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:
|
||||
|
@ -191,6 +202,17 @@ public:
|
|||
const static PinStatus IdleLevel = LOW;
|
||||
};
|
||||
|
||||
class NeoNrf52xPwmInvertedSpeedTm1914
|
||||
{
|
||||
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 = 12 | 0x8000; // ~0.7us
|
||||
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:
|
||||
|
@ -499,6 +521,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwmN> NeoNrf52xPw
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwmN> NeoNrf52xPwmNSk6812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwmN> NeoNrf52xPwmNTm1814Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwmN> NeoNrf52xPwmNTm1829Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwmN> NeoNrf52xPwmNTm1914Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwmN> NeoNrf52xPwmNTx1812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwmN> NeoNrf52xPwmNApa106Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN800KbpsMethod;
|
||||
|
@ -509,6 +532,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm0> NeoNrf52xPw
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm0> NeoNrf52xPwm0Sk6812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1814Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1829Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1914Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm0> NeoNrf52xPwm0Tx1812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm0> NeoNrf52xPwm0Apa106Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0800KbpsMethod;
|
||||
|
@ -519,6 +543,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm1> NeoNrf52xPw
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm1> NeoNrf52xPwm1Sk6812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1814Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1829Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1914Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm1> NeoNrf52xPwm1Tx1812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm1> NeoNrf52xPwm1Apa106Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1800KbpsMethod;
|
||||
|
@ -529,6 +554,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm2> NeoNrf52xPw
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm2> NeoNrf52xPwm2Sk6812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1814Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1829Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1914Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm2> NeoNrf52xPwm2Tx1812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm2> NeoNrf52xPwm2Apa106Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2800KbpsMethod;
|
||||
|
@ -540,6 +566,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedWs2812x, NeoNrf52xPwm3> NeoNrf52xPw
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedSk6812, NeoNrf52xPwm3> NeoNrf52xPwm3Sk6812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1814, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1814Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1829, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1829Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTm1914, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1914Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedTx1812, NeoNrf52xPwm3> NeoNrf52xPwm3Tx1812Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeedApa106, NeoNrf52xPwm3> NeoNrf52xPwm3Apa106Method;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmSpeed800Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3800KbpsMethod;
|
||||
|
@ -552,6 +579,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwmN> Neo
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwmN> NeoNrf52xPwmNSk6812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwmN> NeoNrf52xPwmNTm1814InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwmN> NeoNrf52xPwmNTm1829InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwmN> NeoNrf52xPwmNTm1914InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwmN> NeoNrf52xPwmNTx1812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwmN> NeoNrf52xPwmNApa106InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwmN> NeoNrf52xPwmN800KbpsInvertedMethod;
|
||||
|
@ -562,6 +590,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm0> Neo
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm0> NeoNrf52xPwm0Sk6812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1814InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1829InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm0> NeoNrf52xPwm0Tm1914InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm0> NeoNrf52xPwm0Tx1812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm0> NeoNrf52xPwm0Apa106InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm0> NeoNrf52xPwm0800KbpsInvertedMethod;
|
||||
|
@ -572,6 +601,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm1> Neo
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm1> NeoNrf52xPwm1Sk6812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1814InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1829InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm1> NeoNrf52xPwm1Tm1914InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm1> NeoNrf52xPwm1Tx1812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm1> NeoNrf52xPwm1Apa106InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm1> NeoNrf52xPwm1800KbpsInvertedMethod;
|
||||
|
@ -582,6 +612,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm2> Neo
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm2> NeoNrf52xPwm2Sk6812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1814InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1829InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm2> NeoNrf52xPwm2Tm1914InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm2> NeoNrf52xPwm2Tx1812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm2> NeoNrf52xPwm2Apa106InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm2> NeoNrf52xPwm2800KbpsInvertedMethod;
|
||||
|
@ -593,6 +624,7 @@ typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedWs2812x, NeoNrf52xPwm3> Neo
|
|||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedSk6812, NeoNrf52xPwm3> NeoNrf52xPwm3Sk6812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1814, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1814InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1829, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1829InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTm1914, NeoNrf52xPwm3> NeoNrf52xPwm3Tm1914InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedTx1812, NeoNrf52xPwm3> NeoNrf52xPwm3Tx1812InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeedApa106, NeoNrf52xPwm3> NeoNrf52xPwm3Apa106InvertedMethod;
|
||||
typedef NeoNrf52xMethodBase<NeoNrf52xPwmInvertedSpeed800Kbps, NeoNrf52xPwm3> NeoNrf52xPwm3800KbpsInvertedMethod;
|
||||
|
@ -607,6 +639,7 @@ typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2811Method;
|
|||
typedef NeoNrf52xPwm2Sk6812Method NeoSk6812Method;
|
||||
typedef NeoNrf52xPwm2Tm1814Method NeoTm1814Method;
|
||||
typedef NeoNrf52xPwm2Tm1829Method NeoTm1829Method;
|
||||
typedef NeoNrf52xPwm2Tm1914Method NeoTm1914Method;
|
||||
typedef NeoNrf52xPwm2Tx1812Method NeoTx1812Method;
|
||||
typedef NeoNrf52xPwm2Sk6812Method NeoLc8812Method;
|
||||
typedef NeoNrf52xPwm2Apa106Method NeoApa106Method;
|
||||
|
@ -621,6 +654,7 @@ typedef NeoNrf52xPwm2800KbpsInvertedMethod NeoWs2812InvertedMethod;
|
|||
typedef NeoNrf52xPwm2Sk6812InvertedMethod NeoSk6812InvertedMethod;
|
||||
typedef NeoNrf52xPwm2Tm1814InvertedMethod NeoTm1814InvertedMethod;
|
||||
typedef NeoNrf52xPwm2Tm1829InvertedMethod NeoTm1829InvertedMethod;
|
||||
typedef NeoNrf52xPwm2Tm1914InvertedMethod NeoTm1914InvertedMethod;
|
||||
typedef NeoNrf52xPwm2Tx1812InvertedMethod NeoTx1812InvertedMethod;
|
||||
typedef NeoNrf52xPwm2Sk6812InvertedMethod NeoLc8812InvertedMethod;
|
||||
typedef NeoNrf52xPwm2Apa106InvertedMethod NeoApa106InvertedMethod;
|
||||
|
|
|
@ -29,7 +29,7 @@ License along with NeoPixel. If not, see
|
|||
<http://www.gnu.org/licenses/>.
|
||||
-------------------------------------------------------------------------*/
|
||||
|
||||
template <typename T_LAYOUT> class NeoRingTopology : protected T_LAYOUT
|
||||
template <typename T_LAYOUT> class NeoRingTopology : public T_LAYOUT
|
||||
{
|
||||
public:
|
||||
NeoRingTopology()
|
||||
|
@ -85,7 +85,7 @@ public:
|
|||
|
||||
uint8_t getCountOfRings() const
|
||||
{
|
||||
return _ringCount() - 1; // minus one as the Rings includes the extra value
|
||||
return T_LAYOUT::_ringCount() - 1; // minus one as the Rings includes the extra value
|
||||
}
|
||||
|
||||
uint16_t getPixelCountAtRing(uint8_t ring) const
|
||||
|
@ -100,7 +100,7 @@ public:
|
|||
|
||||
uint16_t getPixelCount() const
|
||||
{
|
||||
return T_LAYOUT::Rings[_ringCount() - 1]; // the last entry is the total count
|
||||
return T_LAYOUT::Rings[T_LAYOUT::_ringCount() - 1]; // the last entry is the total count
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -109,8 +109,4 @@ private:
|
|||
return T_LAYOUT::Rings[ring] + pixel;
|
||||
}
|
||||
|
||||
uint8_t _ringCount() const
|
||||
{
|
||||
return sizeof(T_LAYOUT::Rings) / sizeof(T_LAYOUT::Rings[0]);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
|
||||
static const uint8_t* pixels(const uint8_t* pData)
|
||||
{
|
||||
return pData;
|
||||
return pData + SettingsSize;
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -0,0 +1,174 @@
|
|||
/*-------------------------------------------------------------------------
|
||||
NeoTm1914ColorFeatures provides feature classes to describe color order and
|
||||
color depth for NeoPixelBus template class specific to the TM1914 chip
|
||||
|
||||
Written by Michael C. Miller.
|
||||
|
||||
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
|
||||
|
||||
enum NeoTm1914_Mode
|
||||
{
|
||||
NeoTm1914_Mode_DinFdinAutoSwitch, // Switches between DIN and FDIN on any signal pause > 300ms
|
||||
NeoTm1914_Mode_DinOnly, // DIN input pin used exclusively
|
||||
NeoTm1914_Mode_FdinOnly // FDIN input pin used exclusively
|
||||
};
|
||||
|
||||
class NeoTm1914Settings
|
||||
{
|
||||
public:
|
||||
NeoTm1914Settings(NeoTm1914_Mode mode = NeoTm1914_Mode_DinOnly) :
|
||||
Mode(mode)
|
||||
{
|
||||
}
|
||||
|
||||
NeoTm1914_Mode Mode;
|
||||
};
|
||||
|
||||
class Neo3ElementsTm1914Settings : public Neo3Elements
|
||||
{
|
||||
public:
|
||||
typedef NeoTm1914Settings SettingsObject;
|
||||
static const size_t SettingsSize = 6;
|
||||
|
||||
static void applySettings(uint8_t* pData, const SettingsObject& settings)
|
||||
{
|
||||
uint8_t* pSet = pData;
|
||||
uint8_t mode = 0xff;
|
||||
|
||||
// C1 - the mode
|
||||
*pSet++ = 0xff;
|
||||
*pSet++ = 0xff;
|
||||
|
||||
switch (settings.Mode)
|
||||
{
|
||||
case NeoTm1914_Mode_DinFdinAutoSwitch:
|
||||
mode = 0xff;
|
||||
break;
|
||||
|
||||
case NeoTm1914_Mode_FdinOnly:
|
||||
mode = 0xfa;
|
||||
break;
|
||||
|
||||
case NeoTm1914_Mode_DinOnly:
|
||||
default:
|
||||
mode = 0xf5;
|
||||
break;
|
||||
}
|
||||
*pSet++ = mode;
|
||||
|
||||
// C2 - ones compliment of the above
|
||||
uint8_t* pC1 = pData;
|
||||
for (uint8_t elem = 0; elem < 3; elem++)
|
||||
{
|
||||
*pSet++ = ~(*pC1++);
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t* pixels(uint8_t* pData)
|
||||
{
|
||||
return pData + SettingsSize;
|
||||
}
|
||||
|
||||
static const uint8_t* pixels(const uint8_t* pData)
|
||||
{
|
||||
return pData + SettingsSize;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
class NeoRgbTm1914Feature : public Neo3ElementsTm1914Settings
|
||||
{
|
||||
public:
|
||||
static void applyPixelColor(uint8_t* pPixels, uint16_t indexPixel, ColorObject color)
|
||||
{
|
||||
uint8_t* p = getPixelAddress(pPixels, indexPixel);
|
||||
|
||||
*p++ = color.R;
|
||||
*p++ = color.G;
|
||||
*p = color.B;
|
||||
}
|
||||
|
||||
static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel)
|
||||
{
|
||||
ColorObject color;
|
||||
const uint8_t* p = getPixelAddress(pPixels, indexPixel);
|
||||
|
||||
color.R = *p++;
|
||||
color.G = *p++;
|
||||
color.B = *p;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
static ColorObject retrievePixelColor_P(PGM_VOID_P pPixels, uint16_t indexPixel)
|
||||
{
|
||||
ColorObject color;
|
||||
const uint8_t* p = getPixelAddress((const uint8_t*)pPixels, indexPixel);
|
||||
|
||||
color.R = pgm_read_byte(p++);
|
||||
color.G = pgm_read_byte(p++);
|
||||
color.B = pgm_read_byte(p);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
|
||||
class NeoGrbTm1914Feature : public Neo3ElementsTm1914Settings
|
||||
{
|
||||
public:
|
||||
static void applyPixelColor(uint8_t* pPixels, uint16_t indexPixel, ColorObject color)
|
||||
{
|
||||
uint8_t* p = getPixelAddress(pPixels, indexPixel);
|
||||
|
||||
*p++ = color.G;
|
||||
*p++ = color.R;
|
||||
*p = color.B;
|
||||
}
|
||||
|
||||
static ColorObject retrievePixelColor(const uint8_t* pPixels, uint16_t indexPixel)
|
||||
{
|
||||
ColorObject color;
|
||||
const uint8_t* p = getPixelAddress(pPixels, indexPixel);
|
||||
|
||||
color.G = *p++;
|
||||
color.R = *p++;
|
||||
color.B = *p;
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
static ColorObject retrievePixelColor_P(PGM_VOID_P pPixels, uint16_t indexPixel)
|
||||
{
|
||||
ColorObject color;
|
||||
const uint8_t* p = getPixelAddress((const uint8_t*)pPixels, indexPixel);
|
||||
|
||||
color.G = pgm_read_byte(p++);
|
||||
color.R = pgm_read_byte(p++);
|
||||
color.B = pgm_read_byte(p);
|
||||
|
||||
return color;
|
||||
}
|
||||
|
||||
};
|
Loading…
Reference in New Issue