diff --git a/src/internal/NeoEsp32RmtMethod.cpp b/src/internal/NeoEsp32RmtMethod.cpp index c7817cb..f1a3518 100644 --- a/src/internal/NeoEsp32RmtMethod.cpp +++ b/src/internal/NeoEsp32RmtMethod.cpp @@ -186,6 +186,17 @@ void NeoEsp32RmtSpeedApa106::Translate(const void* src, RmtBit0, RmtBit1, RmtDurationReset); } +void NeoEsp32RmtSpeedTx1812::Translate(const void* src, + rmt_item32_t* dest, + size_t src_size, + size_t wanted_num, + size_t* translated_size, + size_t* item_num) +{ + _translate(src, dest, src_size, wanted_num, translated_size, item_num, + RmtBit0, RmtBit1, RmtDurationReset); +} + void NeoEsp32RmtInvertedSpeedWs2811::Translate(const void* src, rmt_item32_t* dest, size_t src_size, @@ -262,4 +273,15 @@ void NeoEsp32RmtInvertedSpeedApa106::Translate(const void* src, _translate(src, dest, src_size, wanted_num, translated_size, item_num, RmtBit0, RmtBit1, RmtDurationReset); } + +void NeoEsp32RmtInvertedSpeedTx1812::Translate(const void* src, + rmt_item32_t* dest, + size_t src_size, + size_t wanted_num, + size_t* translated_size, + size_t* item_num) +{ + _translate(src, dest, src_size, wanted_num, translated_size, item_num, + RmtBit0, RmtBit1, RmtDurationReset); +} #endif \ No newline at end of file diff --git a/src/internal/NeoEsp32RmtMethod.h b/src/internal/NeoEsp32RmtMethod.h index e42f675..41da7e2 100644 --- a/src/internal/NeoEsp32RmtMethod.h +++ b/src/internal/NeoEsp32RmtMethod.h @@ -229,6 +229,21 @@ public: size_t* item_num); }; +class NeoEsp32RmtSpeedTx1812 : public NeoEsp32RmtSpeedBase +{ +public: + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 600); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(600, 300); + const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us + + static void IRAM_ATTR Translate(const void* src, + rmt_item32_t* dest, + size_t src_size, + size_t wanted_num, + size_t* translated_size, + size_t* item_num); +}; + class NeoEsp32RmtInvertedSpeedWs2811 : public NeoEsp32RmtInvertedSpeedBase { public: @@ -351,6 +366,21 @@ public: size_t* item_num); }; +class NeoEsp32RmtInvertedSpeedTx1812 : public NeoEsp32RmtInvertedSpeedBase +{ +public: + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 600); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(600, 300); + const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(80000); // 80us + + static void IRAM_ATTR Translate(const void* src, + rmt_item32_t* dest, + size_t src_size, + size_t wanted_num, + size_t* translated_size, + size_t* item_num); +}; + class NeoEsp32RmtChannel0 { public: @@ -556,6 +586,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32RmtNSk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNApa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN400KbpsMethod; @@ -565,6 +596,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0400KbpsMethod; @@ -574,6 +606,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1400KbpsMethod; @@ -583,6 +616,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2400KbpsMethod; @@ -592,6 +626,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3400KbpsMethod; @@ -604,6 +639,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4400KbpsMethod; @@ -613,6 +649,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5400KbpsMethod; @@ -622,6 +659,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6400KbpsMethod; @@ -631,6 +669,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1829Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Apa106Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tx1812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7400KbpsMethod; @@ -642,6 +681,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32RmtNSk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNApa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN400KbpsInvertedMethod; @@ -651,6 +691,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0400KbpsInvertedMethod; @@ -660,6 +701,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1400KbpsInvertedMethod; @@ -669,6 +711,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2400KbpsInvertedMethod; @@ -678,6 +721,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3400KbpsInvertedMethod; @@ -690,6 +734,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4400KbpsInvertedMethod; @@ -699,6 +744,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5400KbpsInvertedMethod; @@ -708,6 +754,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6400KbpsInvertedMethod; @@ -717,6 +764,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1829InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Apa106InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tx1812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7400KbpsInvertedMethod; @@ -737,6 +785,7 @@ typedef NeoEsp32Rmt6Tm1814Method NeoTm1814Method; typedef NeoEsp32Rmt6Tm1829Method NeoTm1829Method; typedef NeoEsp32Rmt6Sk6812Method NeoLc8812Method; typedef NeoEsp32Rmt6Apa106Method NeoApa106Method; +typedef NeoEsp32Rmt6Tx1812Method NeoTx1812Method; typedef NeoEsp32Rmt6Ws2812xMethod Neo800KbpsMethod; typedef NeoEsp32Rmt6400KbpsMethod Neo400KbpsMethod; @@ -750,6 +799,7 @@ typedef NeoEsp32Rmt6Tm1814InvertedMethod NeoTm1814InvertedMethod; typedef NeoEsp32Rmt6Tm1829InvertedMethod NeoTm1829InvertedMethod; typedef NeoEsp32Rmt6Sk6812InvertedMethod NeoLc8812InvertedMethod; typedef NeoEsp32Rmt6Apa106InvertedMethod NeoApa106InvertedMethod; +typedef NeoEsp32Rmt6Tx1812InvertedMethod NeoTx1812InvertedMethod; typedef NeoEsp32Rmt6Ws2812xInvertedMethod Neo800KbpsInvertedMethod; typedef NeoEsp32Rmt6400KbpsInvertedMethod Neo400KbpsInvertedMethod; @@ -765,6 +815,7 @@ typedef NeoEsp32Rmt3Tm1814Method NeoTm1814Method; typedef NeoEsp32Rmt3Tm1829Method NeoTm1829Method; typedef NeoEsp32Rmt3Sk6812Method NeoLc8812Method; typedef NeoEsp32Rmt3Apa106Method NeoApa106Method; +typedef NeoEsp32Rmt3Tx1812Method NeoTx1812Method; typedef NeoEsp32Rmt3Ws2812xMethod Neo800KbpsMethod; typedef NeoEsp32Rmt3400KbpsMethod Neo400KbpsMethod; @@ -778,6 +829,7 @@ typedef NeoEsp32Rmt3Tm1814InvertedMethod NeoTm1814InvertedMethod; typedef NeoEsp32Rmt3Tm1829InvertedMethod NeoTm1829InvertedMethod; typedef NeoEsp32Rmt3Sk6812InvertedMethod NeoLc8812InvertedMethod; typedef NeoEsp32Rmt3Apa106InvertedMethod NeoApa106InvertedMethod; +typedef NeoEsp32Rmt3Tx1812InvertedMethod NeoTx1812InvertedMethod; typedef NeoEsp32Rmt3Ws2812xInvertedMethod Neo800KbpsInvertedMethod; typedef NeoEsp32Rmt3400KbpsInvertedMethod Neo400KbpsInvertedMethod;