diff --git a/src/internal/methods/NeoEsp32RmtMethod.cpp b/src/internal/methods/NeoEsp32RmtMethod.cpp index 2ae3492..9d6a50e 100644 --- a/src/internal/methods/NeoEsp32RmtMethod.cpp +++ b/src/internal/methods/NeoEsp32RmtMethod.cpp @@ -219,6 +219,17 @@ void NeoEsp32RmtSpeedTx1812::Translate(const void* src, RmtBit0, RmtBit1, RmtDurationReset); } +void NeoEsp32RmtSpeedGs1903::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, @@ -328,4 +339,16 @@ void NeoEsp32RmtInvertedSpeedTx1812::Translate(const void* src, _translate(src, dest, src_size, wanted_num, translated_size, item_num, RmtBit0, RmtBit1, RmtDurationReset); } + +void NeoEsp32RmtInvertedSpeedGs1903::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/methods/NeoEsp32RmtMethod.h b/src/internal/methods/NeoEsp32RmtMethod.h index 2a22163..edaab53 100644 --- a/src/internal/methods/NeoEsp32RmtMethod.h +++ b/src/internal/methods/NeoEsp32RmtMethod.h @@ -264,6 +264,21 @@ public: size_t* item_num); }; +class NeoEsp32RmtSpeedGs1903 : public NeoEsp32RmtSpeedBase +{ +public: + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 900); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(900, 300); + const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(40000); // 40us + + 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: @@ -417,6 +432,21 @@ public: size_t* item_num); }; +class NeoEsp32RmtInvertedSpeedGs1903 : public NeoEsp32RmtInvertedSpeedBase +{ +public: + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(300, 900); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(900, 300); + const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(40000); // 40us + + 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: @@ -635,6 +665,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNApa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNGs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN400KbpsMethod; @@ -647,6 +678,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0400KbpsMethod; @@ -659,6 +691,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1400KbpsMethod; @@ -673,6 +706,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2400KbpsMethod; @@ -685,6 +719,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3400KbpsMethod; @@ -699,6 +734,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4400KbpsMethod; @@ -711,6 +747,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5400KbpsMethod; @@ -723,6 +760,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6400KbpsMethod; @@ -735,6 +773,7 @@ typedef NeoEsp32RmtMethodBase NeoEs typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1914Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Apa106Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tx1812Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Gs1903Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7800KbpsMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7400KbpsMethod; @@ -751,6 +790,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNApa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNGs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtN400KbpsInvertedMethod; @@ -763,6 +803,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0400KbpsInvertedMethod; @@ -775,6 +816,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1400KbpsInvertedMethod; @@ -789,6 +831,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2400KbpsInvertedMethod; @@ -801,6 +844,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3400KbpsInvertedMethod; @@ -815,6 +859,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4400KbpsInvertedMethod; @@ -827,6 +872,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5400KbpsInvertedMethod; @@ -839,6 +885,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6400KbpsInvertedMethod; @@ -851,6 +898,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1914InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Apa106InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tx1812InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Gs1903InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7800KbpsInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7400KbpsInvertedMethod; @@ -862,11 +910,11 @@ typedef NeoEsp32RmtMethodBase