diff --git a/src/internal/NeoUtil.h b/src/internal/NeoUtil.h index d7ae0c3..575f9fc 100644 --- a/src/internal/NeoUtil.h +++ b/src/internal/NeoUtil.h @@ -52,6 +52,8 @@ License along with NeoPixel. If not, see #ifdef PIN_NOT_A_PIN #define NOT_A_PIN PIN_NOT_A_PIN +#else +#define NOT_A_PIN -1 #endif #endif diff --git a/src/internal/methods/NeoArmMethod.h b/src/internal/methods/NeoArmMethod.h index 0298be3..fc0fa2c 100644 --- a/src/internal/methods/NeoArmMethod.h +++ b/src/internal/methods/NeoArmMethod.h @@ -136,6 +136,15 @@ public: static const uint32_t ResetTimeUs = 300; }; +class NeoArmMk20dxSpeedPropsWs2805 +{ +public: + static const uint32_t CyclesT0h = (F_CPU / 4000000); + static const uint32_t CyclesT1h = (F_CPU / 913750); + static const uint32_t Cycles = (F_CPU / 584800); + static const uint32_t ResetTimeUs = 300; +}; + class NeoArmMk20dxSpeedPropsSk6812 : public NeoArmMk20dxSpeedProps800KbpsBase { public: @@ -223,6 +232,7 @@ public: }; typedef NeoArmMethodBase> NeoArmWs2812xMethod; +typedef NeoArmMethodBase> NeoArmWs2805Method; typedef NeoArmMethodBase> NeoArmSk6812Method; typedef NeoArmMethodBase> NeoArmTm1814InvertedMethod; typedef NeoArmMethodBase> NeoArmTm1829InvertedMethod; @@ -362,6 +372,7 @@ typedef NeoArmMethodBase NeoArmTm1814InvertedMethod; typedef NeoArmMethodBase NeoArmTm1829InvertedMethod; typedef NeoArmMethodBase NeoArm800KbpsMethod; typedef NeoArm800KbpsMethod NeoArmApa106Method; +typedef NeoArmWs2812xMethod NeoArmWs2805Method; typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod; #else @@ -427,7 +438,7 @@ public: }; -class NeoArmSamd21g18aSpeedProps400Kbps +class NeoArmSamd21g18aSpeedProps400KbpsBase { public: static void BitPreWait() @@ -452,9 +463,20 @@ public: { asm("nop; nop; nop; nop; nop; nop; nop;"); } +}; + +class NeoArmSamd21g18aSpeedProps400Kbps : public NeoArmSamd21g18aSpeedProps400KbpsBase +{ +public: static const uint32_t ResetTimeUs = 50; }; +class NeoArmSamd21g18aSpeedPropsWs2805 : public NeoArmSamd21g18aSpeedProps400KbpsBase +{ +public: + static const uint32_t ResetTimeUs = 300; +}; + template class NeoArmSamd21g18aSpeedBase { public: @@ -507,6 +529,7 @@ public: }; typedef NeoArmMethodBase> NeoArmWs2812xMethod; +typedef NeoArmMethodBase> NeoArmWs2805Method; typedef NeoArmMethodBase> NeoArmSk6812Method; typedef NeoArmMethodBase> NeoArmTm1814InvertedMethod; typedef NeoArmMethodBase> NeoArmTm1829InvertedMethod; @@ -708,6 +731,7 @@ typedef NeoArmMethodBase> NeoA typedef NeoArmMethodBase> NeoArmTm1829InvertedMethod; typedef NeoArmMethodBase> NeoArm800KbpsMethod; typedef NeoArm800KbpsMethod NeoArmApa106Method; +typedef NeoArmWs2812xMethod NeoArmWs2805Method; typedef NeoArmTm1814InvertedMethod NeoArmTm1914InvertedMethod; #else // Other ARM architecture -- Presumed Arduino Due @@ -730,6 +754,15 @@ public: static const uint32_t ResetTimeUs = 300; }; +class NeoArmOtherSpeedPropsWs2805 +{ +public: + static const uint32_t CyclesT0h = static_cast((0.35 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST)); + static const uint32_t CyclesT1h = static_cast((1.35 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST)); + static const uint32_t Cycles = static_cast((1.70 * ARM_OTHER_SCALE + 0.5) - (5 * ARM_OTHER_INST)); + static const uint32_t ResetTimeUs = 300; +}; + class NeoArmOtherSpeedPropsSk6812 : public NeoArmOtherSpeedProps800KbpsBase { public: @@ -840,6 +873,7 @@ public: }; typedef NeoArmMethodBase> NeoArmWs2812xMethod; +typedef NeoArmMethodBase> NeoArmWs2805Method; typedef NeoArmMethodBase> NeoArmSk6812Method; typedef NeoArmMethodBase> NeoArmTm1814InvertedMethod; typedef NeoArmMethodBase> NeoArmTm1829InvertedMethod; @@ -856,6 +890,7 @@ typedef NeoArmWs2812xMethod NeoWs2813Method; typedef NeoArmWs2812xMethod NeoWs2812xMethod; typedef NeoArmWs2812xMethod NeoWs2811Method; typedef NeoArmWs2812xMethod NeoWs2816Method; +typedef NeoArmWs2805Method NeoWs2805Method; typedef NeoArmSk6812Method NeoSk6812Method; typedef NeoArmSk6812Method NeoLc8812Method; typedef NeoArm800KbpsMethod NeoWs2812Method; diff --git a/src/internal/methods/NeoAvrMethod.h b/src/internal/methods/NeoAvrMethod.h index a17f425..d534ff1 100644 --- a/src/internal/methods/NeoAvrMethod.h +++ b/src/internal/methods/NeoAvrMethod.h @@ -113,6 +113,12 @@ public: static const uint32_t ResetTimeUs = 300; }; +class NeoAvrSpeedWs2805 : public NeoAvrSpeed600KbpsBase +{ +public: + static const uint32_t ResetTimeUs = 300; +}; + class NeoAvrSpeedSk6812 : public NeoAvrSpeed800KbpsBase { public: @@ -323,6 +329,7 @@ private: }; typedef NeoAvrMethodBase NeoAvrWs2812xMethod; +typedef NeoAvrMethodBase NeoAvrWs2805Method; typedef NeoAvrMethodBase NeoAvrSk6812Method; typedef NeoAvrMethodBase NeoAvrApa106Method; typedef NeoAvrIpsMethodBase NeoAvr600KbpsIpsMethod; @@ -339,6 +346,7 @@ typedef NeoAvrWs2812xMethod NeoWs2812xMethod; typedef NeoAvr800KbpsMethod NeoWs2812Method; typedef NeoAvrWs2812xMethod NeoWs2811Method; typedef NeoAvrWs2812xMethod NeoWs2816Method; +typedef NeoAvrWs2805Method NeoWs2805Method; typedef NeoAvrSk6812Method NeoSk6812Method; typedef NeoAvrSk6812Method NeoLc8812Method; typedef NeoAvrApa106Method NeoApa106Method; diff --git a/src/internal/methods/NeoEsp32I2sMethod.h b/src/internal/methods/NeoEsp32I2sMethod.h index 99845dd..97e304a 100644 --- a/src/internal/methods/NeoEsp32I2sMethod.h +++ b/src/internal/methods/NeoEsp32I2sMethod.h @@ -45,6 +45,14 @@ public: const static uint16_t ResetTimeUs = 300; }; +class NeoEsp32I2sSpeedWs2805 +{ +public: + const static uint32_t I2sSampleRate = 72960; // 588,235 hz / 8 = 73,529 sample rate + const static uint16_t ByteSendTimeUs = 14; + const static uint16_t ResetTimeUs = 300; +}; + class NeoEsp32I2sSpeedSk6812 { public: @@ -284,6 +292,7 @@ private: }; typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Ws2812xMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Ws2805Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Sk6812Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Tm1814Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Tm1829Method; @@ -294,6 +303,7 @@ typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Ws2812xInvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2s0SWs2805InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Sk6812InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Tm1814InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2s0Tm1914InvertedMethod; @@ -306,6 +316,7 @@ typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Ws2812xMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Ws2805Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Sk6812Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Tm1814Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Tm1829Method; @@ -315,6 +326,7 @@ typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Apa106Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Ws2812xInvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Ws2805InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Sk6812InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Tm1814InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2s1Tm1829InvertedMethod; @@ -325,6 +337,7 @@ typedef NeoEsp32I2sMethodBase NeoEsp32I2sNWs2812xMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNWs2805Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2sNSk6812Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2sNTm1814Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2sNTm1829Method; @@ -334,6 +347,7 @@ typedef NeoEsp32I2sMethodBase NeoEsp32I2sNApa106Method; typedef NeoEsp32I2sMethodBase NeoEsp32I2sNWs2812xInvertedMethod; +typedef NeoEsp32I2sMethodBase NeoEsp32I2sNWs2805InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2sNSk6812InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2sNTm1814InvertedMethod; typedef NeoEsp32I2sMethodBase NeoEsp32I2sNTm1829InvertedMethod; @@ -353,6 +367,7 @@ typedef NeoEsp32I2s1Ws2812xMethod NeoWs2812xMethod; typedef NeoEsp32I2s1800KbpsMethod NeoWs2812Method; typedef NeoEsp32I2s1Ws2812xMethod NeoWs2811Method; typedef NeoEsp32I2s1Ws2812xMethod NeoWs2816Method; +typedef NeoEsp32I2s1Ws2805Method NeoWs2805Method; typedef NeoEsp32I2s1Sk6812Method NeoSk6812Method; typedef NeoEsp32I2s1Tm1814Method NeoTm1814Method; typedef NeoEsp32I2s1Tm1829Method NeoTm1829Method; @@ -367,6 +382,7 @@ typedef NeoEsp32I2s1Ws2812xInvertedMethod NeoWs2813InvertedMethod; typedef NeoEsp32I2s1Ws2812xInvertedMethod NeoWs2812xInvertedMethod; typedef NeoEsp32I2s1Ws2812xInvertedMethod NeoWs2811InvertedMethod; typedef NeoEsp32I2s1Ws2812xInvertedMethod NeoWs2816InvertedMethod; +typedef NeoEsp32I2s1Ws2805InvertedMethod NeoWs2805InvertedMethod; typedef NeoEsp32I2s1800KbpsInvertedMethod NeoWs2812InvertedMethod; typedef NeoEsp32I2s1Sk6812InvertedMethod NeoSk6812InvertedMethod; typedef NeoEsp32I2s1Tm1814InvertedMethod NeoTm1814InvertedMethod; diff --git a/src/internal/methods/NeoEsp32I2sXMethod.h b/src/internal/methods/NeoEsp32I2sXMethod.h index 9491ba2..be0d975 100644 --- a/src/internal/methods/NeoEsp32I2sXMethod.h +++ b/src/internal/methods/NeoEsp32I2sXMethod.h @@ -616,6 +616,7 @@ typedef NeoEsp32I2sMuxBus NeoEsp32I2s0X8Ws2812xMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Ws2805Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Sk6812Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Tm1814Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Tm1829Method; @@ -633,6 +634,7 @@ typedef NeoEsp32I2s0X8Sk6812Method NeoEsp32I2s0X8Lc8812Method; // I2s0x16 typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Ws2812xMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Ws2805Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Sk6812Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Tm1814Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Tm1829Method; @@ -652,6 +654,7 @@ typedef NeoEsp32I2s0X16Sk6812Method NeoEsp32I2s0X16Lc8812Method; // I2s1x8 typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Ws2812xMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Ws2805Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Sk6812Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Tm1814Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Tm1829Method; @@ -669,6 +672,7 @@ typedef NeoEsp32I2s1X8Sk6812Method NeoEsp32I2s1X8Lc8812Method; // I2s1x16 typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Ws2812xMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Ws2805Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Sk6812Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Tm1814Method; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Tm1829Method; @@ -691,6 +695,7 @@ typedef NeoEsp32I2s1X16Sk6812Method NeoEsp32I2s1X16Lc8812Method; // // I2s0x8 INVERTED typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Ws2812xInvertedMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Ws2805InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Sk6812InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Tm1814InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X8Tm1829InvertedMethod; @@ -709,6 +714,7 @@ typedef NeoEsp32I2s0X8Sk6812InvertedMethod NeoEsp32I2s0X8Lc8812InvertedMethod; // I2s0x16 INVERTED typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Ws2812xInvertedMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Ws2805InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Sk6812InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Tm1814InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s0X16Tm1829InvertedMethod; @@ -728,6 +734,7 @@ typedef NeoEsp32I2s0X16Sk6812InvertedMethod NeoEsp32I2s0X16Lc8812InvertedMethod // I2s1x8 INVERTED typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Ws2812xInvertedMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Ws2805InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Sk6812InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Tm1814InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X8Tm1829InvertedMethod; @@ -745,6 +752,7 @@ typedef NeoEsp32I2s1X8Sk6812InvertedMethod NeoEsp32I2s1X8Lc8812InvertedMethod; // I2s1x16 INVERTED typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Ws2812xInvertedMethod; +typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Ws2805InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Sk6812InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Tm1814InvertedMethod; typedef NeoEsp32I2sXMethodBase NeoEsp32I2s1X16Tm1829InvertedMethod; diff --git a/src/internal/methods/NeoEsp32RmtMethod.cpp b/src/internal/methods/NeoEsp32RmtMethod.cpp index 9d6a50e..596b19c 100644 --- a/src/internal/methods/NeoEsp32RmtMethod.cpp +++ b/src/internal/methods/NeoEsp32RmtMethod.cpp @@ -131,6 +131,17 @@ void NeoEsp32RmtSpeedWs2812x::Translate(const void* src, RmtBit0, RmtBit1, RmtDurationReset); } +void NeoEsp32RmtSpeedWs2805::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 NeoEsp32RmtSpeedSk6812::Translate(const void* src, rmt_item32_t* dest, size_t src_size, @@ -252,6 +263,17 @@ void NeoEsp32RmtInvertedSpeedWs2812x::Translate(const void* src, RmtBit0, RmtBit1, RmtDurationReset); } +void NeoEsp32RmtInvertedSpeedWs2805::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 NeoEsp32RmtInvertedSpeedSk6812::Translate(const void* src, rmt_item32_t* dest, size_t src_size, diff --git a/src/internal/methods/NeoEsp32RmtMethod.h b/src/internal/methods/NeoEsp32RmtMethod.h index 3689950..753a90a 100644 --- a/src/internal/methods/NeoEsp32RmtMethod.h +++ b/src/internal/methods/NeoEsp32RmtMethod.h @@ -141,6 +141,21 @@ public: size_t* item_num); }; +class NeoEsp32RmtSpeedWs2805 : public NeoEsp32RmtSpeedBase +{ +public: + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(350, 1350); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1350, 350); + const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(300000); // 300us + + 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 NeoEsp32RmtSpeedSk6812 : public NeoEsp32RmtSpeedBase { public: @@ -309,6 +324,21 @@ public: size_t* item_num); }; +class NeoEsp32RmtInvertedSpeedWs2805 : public NeoEsp32RmtInvertedSpeedBase +{ +public: + const static DRAM_ATTR uint32_t RmtBit0 = Item32Val(350, 1350); + const static DRAM_ATTR uint32_t RmtBit1 = Item32Val(1350, 350); + const static DRAM_ATTR uint16_t RmtDurationReset = FromNs(300000); // 300us + + 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 NeoEsp32RmtInvertedSpeedSk6812 : public NeoEsp32RmtInvertedSpeedBase { public: @@ -659,6 +689,7 @@ private: typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNSk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1829Method; @@ -672,6 +703,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1829Method; @@ -685,6 +717,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1829Method; @@ -700,6 +733,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1829Method; @@ -713,6 +747,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1829Method; @@ -728,6 +763,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1829Method; @@ -741,6 +777,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1829Method; @@ -754,6 +791,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1829Method; @@ -767,6 +805,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2811Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2812xMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2816Method; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2805Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Sk6812Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1814Method; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1829Method; @@ -784,6 +823,7 @@ typedef NeoEsp32RmtMethodBase NeoE typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32RmtNWs2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNSk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32RmtNTm1829InvertedMethod; @@ -797,6 +837,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt0Tm1829InvertedMethod; @@ -810,6 +851,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt1Tm1829InvertedMethod; @@ -825,6 +867,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt2Tm1829InvertedMethod; @@ -837,6 +880,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2812xInvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Ws2816InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt3Tm1814InvertedMethod; @@ -853,6 +897,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt4Tm1829InvertedMethod; @@ -866,6 +911,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt5Tm1829InvertedMethod; @@ -879,6 +925,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt6Tm1829InvertedMethod; @@ -892,6 +939,7 @@ typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2811InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2812xInvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2816InvertedMethod; +typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Ws2805InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Sk6812InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1814InvertedMethod; typedef NeoEsp32RmtMethodBase NeoEsp32Rmt7Tm1829InvertedMethod; @@ -920,6 +968,7 @@ typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2812xMethod; typedef NeoEsp32Rmt1800KbpsMethod NeoWs2812Method; typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2811Method; typedef NeoEsp32Rmt1Ws2812xMethod NeoWs2816Method; +typedef NeoEsp32Rmt1Ws2805Method NeoWs2805Method; typedef NeoEsp32Rmt1Sk6812Method NeoSk6812Method; typedef NeoEsp32Rmt1Tm1814Method NeoTm1814Method; typedef NeoEsp32Rmt1Tm1829Method NeoTm1829Method; @@ -937,6 +986,7 @@ typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2812xInvertedMethod; typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2811InvertedMethod; typedef NeoEsp32Rmt1800KbpsInvertedMethod NeoWs2812InvertedMethod; typedef NeoEsp32Rmt1Ws2812xInvertedMethod NeoWs2816InvertedMethod; +typedef NeoEsp32Rmt1Ws2805InvertedMethod NeoWs2805InvertedMethod; typedef NeoEsp32Rmt1Sk6812InvertedMethod NeoSk6812InvertedMethod; typedef NeoEsp32Rmt1Tm1814InvertedMethod NeoTm1814InvertedMethod; typedef NeoEsp32Rmt1Tm1829InvertedMethod NeoTm1829InvertedMethod; diff --git a/src/internal/methods/NeoEsp8266DmaMethod.h b/src/internal/methods/NeoEsp8266DmaMethod.h index 4aa0302..49298bc 100644 --- a/src/internal/methods/NeoEsp8266DmaMethod.h +++ b/src/internal/methods/NeoEsp8266DmaMethod.h @@ -83,6 +83,15 @@ public: const static uint32_t ResetTimeUs = 300; }; +class NeoEsp8266DmaSpeedWs2805 : public NeoEsp8266DmaSpeedBase +{ +public: + const static uint32_t I2sClockDivisor = 4; // 0-63 + const static uint32_t I2sBaseClockDivisor = 17; // 0-63 + const static uint32_t ByteSendTimeUs = 14; // us it takes to send a single pixel element + const static uint32_t ResetTimeUs = 300; +}; + class NeoEsp8266DmaSpeedSk6812 : public NeoEsp8266DmaSpeed800KbpsBase { public: @@ -149,6 +158,15 @@ public: const static uint32_t ResetTimeUs = 300; }; +class NeoEsp8266DmaInvertedSpeedWs2805 : public NeoEsp8266DmaInvertedSpeedBase +{ +public: + const static uint32_t I2sClockDivisor = 4; // 0-63 + const static uint32_t I2sBaseClockDivisor = 17; // 0-63 + const static uint32_t ByteSendTimeUs = 14; // us it takes to send a single pixel element + const static uint32_t ResetTimeUs = 300; +}; + class NeoEsp8266DmaInvertedSpeedSk6812 : public NeoEsp8266DmaInvertedSpeed800KbpsBase { public: @@ -378,6 +396,7 @@ private: // normal typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaWs2812xMethod; +typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaWs2805Method; typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaSk6812Method; typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaTm1814Method; typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaTm1829Method; @@ -390,6 +409,7 @@ typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaInvertedWs2812xMethod; +typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaInvertedWs2805Method; typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaInvertedSk6812Method; typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaInvertedTm1814Method; typedef NeoEsp8266DmaMethodBase> NeoEsp8266DmaInvertedTm1829Method; @@ -405,6 +425,7 @@ typedef NeoEsp8266DmaWs2812xMethod NeoWs2812xMethod; typedef NeoEsp8266Dma800KbpsMethod NeoWs2812Method; typedef NeoEsp8266DmaWs2812xMethod NeoWs2811Method; typedef NeoEsp8266DmaWs2812xMethod NeoWs2816Method; +typedef NeoEsp8266DmaWs2805Method NeoWs2805Method; typedef NeoEsp8266DmaSk6812Method NeoSk6812Method; typedef NeoEsp8266DmaTm1814Method NeoTm1814Method; typedef NeoEsp8266DmaTm1829Method NeoTm1829Method; @@ -422,6 +443,7 @@ typedef NeoEsp8266DmaInvertedWs2812xMethod NeoWs2812xInvertedMethod; typedef NeoEsp8266DmaInverted800KbpsMethod NeoWs2812InvertedMethod; typedef NeoEsp8266DmaInvertedWs2812xMethod NeoWs2811InvertedMethod; typedef NeoEsp8266DmaInvertedWs2812xMethod NeoWs2816InvertedMethod; +typedef NeoEsp8266DmaInvertedWs2805Method NeoWs2805InvertedMethod; typedef NeoEsp8266DmaInvertedSk6812Method NeoSk6812InvertedMethod; typedef NeoEsp8266DmaInvertedTm1814Method NeoTm1814InvertedMethod; typedef NeoEsp8266DmaInvertedTm1829Method NeoTm1829InvertedMethod; diff --git a/src/internal/methods/NeoEsp8266UartMethod.h b/src/internal/methods/NeoEsp8266UartMethod.h index cdeae07..c7fc1ff 100644 --- a/src/internal/methods/NeoEsp8266UartMethod.h +++ b/src/internal/methods/NeoEsp8266UartMethod.h @@ -294,6 +294,16 @@ public: static const uint32_t ResetTimeUs = 300; // us between data send bursts to reset for next update }; +// NeoEsp8266UartSpeedWs2805 contains the timing constant used to get NeoPixelBus running for Ws2805 +// Pulse cycle = 1.71 = 1.368 longer than normal, 0.731 slower, NeoEsp8266UartSpeedApa1066 +class NeoEsp8266UartSpeedWs2805 +{ +public: + static const uint32_t ByteSendTimeUs = 14; // us it takes to send a single pixel element at 400khz speed + static const uint32_t UartBaud = 2339181; // APA106 pulse cycle of 1.71us, 4 serial bytes per NeoByte + static const uint32_t ResetTimeUs = 300; // us between data send bursts to reset for next update +}; + class NeoEsp8266UartSpeedSk6812 : public NeoEsp8266UartSpeed800KbpsBase { public: @@ -433,6 +443,7 @@ private: // uart 0 typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Ws2812xMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Ws2805Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Sk6812Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart0Tm1814Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart0Tm1829Method; @@ -449,6 +460,7 @@ typedef NeoEsp8266Uart0Sk6812Method NeoEsp8266Uart0Lc8812Method; // uart 1 typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Ws2812xMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Ws2805Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Sk6812Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart1Tm1814Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart1Tm1829Method; @@ -465,6 +477,7 @@ typedef NeoEsp8266Uart1Sk6812Method NeoEsp8266Uart1Lc8812Method; // uart 0 async typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Ws2812xMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Ws2805Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Sk6812Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Tm1814Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Tm1829Method; @@ -481,6 +494,7 @@ typedef NeoEsp8266AsyncUart0Sk6812Method NeoEsp8266AsyncUart0Lc8812Method; // uart 1 async typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Ws2812xMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Ws2805Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Sk6812Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Tm1814Method; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Tm1829Method; @@ -499,6 +513,7 @@ typedef NeoEsp8266AsyncUart1Sk6812Method NeoEsp8266AsyncUart1Lc8812Method; // // uart 0 typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart0Ws2812xInvertedMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart0Ws2805InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart0Sk6812InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Tm1814InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart0Tm1829InvertedMethod; @@ -515,6 +530,7 @@ typedef NeoEsp8266Uart0Sk6812InvertedMethod NeoEsp8266Uart0Lc8812InvertedMethod; // uart 1 typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart1Ws2812xInvertedMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart1Ws2805InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266Uart1Sk6812InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Tm1814InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266Uart1Tm1829InvertedMethod; @@ -531,6 +547,7 @@ typedef NeoEsp8266Uart1Sk6812InvertedMethod NeoEsp8266Uart1Lc8812InvertedMethod; // uart 0 async typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Ws2812xInvertedMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Ws2805InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart0Sk6812InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Tm1814InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart0Tm1829InvertedMethod; @@ -547,6 +564,7 @@ typedef NeoEsp8266AsyncUart0Sk6812InvertedMethod NeoEsp8266AsyncUart0Lc8812Inver // uart 1 async typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Ws2812xInvertedMethod; +typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Ws2805InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartInverted> NeoEsp8266AsyncUart1Sk6812InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Tm1814InvertedMethod; typedef NeoEsp8266UartMethodBase, NeoEsp8266UartNotInverted> NeoEsp8266AsyncUart1Tm1829InvertedMethod; diff --git a/src/internal/methods/NeoEspBitBangMethod.h b/src/internal/methods/NeoEspBitBangMethod.h index a465500..4be46a2 100644 --- a/src/internal/methods/NeoEspBitBangMethod.h +++ b/src/internal/methods/NeoEspBitBangMethod.h @@ -84,6 +84,17 @@ public: const static uint32_t TLatch = (F_CPU / 22222 - CYCLES_LOOPTEST); // 45us, be generous }; +class NeoEspBitBangSpeedWs2805 +{ +public: + const static uint32_t T0H = (F_CPU / 2857143 - CYCLES_LOOPTEST); // 0.35us + const static uint32_t T1H = (F_CPU / 740741 - CYCLES_LOOPTEST); // 1.35 + const static uint32_t Period = (F_CPU / 606061 - CYCLES_LOOPTEST); // 1.65us + + static const uint32_t ResetTimeUs = 300; + const static uint32_t TLatch = (F_CPU / 22222 - CYCLES_LOOPTEST); // 45us, be generous +}; + class NeoEspBitBangSpeedSk6812 { public: @@ -279,6 +290,7 @@ private: typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2811Method; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2812xMethod; +typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2805Method; typedef NeoEspBitBangMethodBase NeoEsp32BitBangSk6812Method; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1814Method; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1829Method; @@ -295,6 +307,7 @@ typedef NeoEsp32BitBangSk6812Method NeoEsp32BitBangLc8812Method; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2811InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2812xInvertedMethod; +typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2805InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangSk6812InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1814InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1829InvertedMethod; @@ -311,6 +324,7 @@ typedef NeoEsp32BitBangSk6812InvertedMethod NeoEsp32BitBangLc8812InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2811NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2812xNoIntrMethod; +typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2805NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangSk6812NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1814NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1829NoIntrMethod; @@ -327,6 +341,7 @@ typedef NeoEsp32BitBangSk6812Method NeoEsp32BitBangLc8812NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2811InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2812xInvertedNoIntrMethod; +typedef NeoEspBitBangMethodBase NeoEsp32BitBangWs2805InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangSk6812InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1814InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp32BitBangTm1829InvertedNoIntrMethod; @@ -345,6 +360,7 @@ typedef NeoEsp32BitBangSk6812InvertedMethod NeoEsp32BitBangLc8812InvertedNoIntrM typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2811Method; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2812xMethod; +typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2805Method; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangSk6812Method; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1814Method; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1829Method; @@ -361,6 +377,7 @@ typedef NeoEsp8266BitBangSk6812Method NeoEsp8266BitBangLc8812Method; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2811InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2812xInvertedMethod; +typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2805InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangSk6812InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1814InvertedMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1829InvertedMethod; @@ -377,6 +394,7 @@ typedef NeoEsp8266BitBangSk6812InvertedMethod NeoEsp8266BitBangLc8812InvertedMet typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2811NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2812xNoIntrMethod; +typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2805NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangSk6812NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1814NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1829NoIntrMethod; @@ -393,6 +411,7 @@ typedef NeoEsp8266BitBangSk6812Method NeoEsp8266BitBangLc8812NoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2811InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2812xInvertedNoIntrMethod; +typedef NeoEspBitBangMethodBase NeoEsp8266BitBangWs2805InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangSk6812InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1814InvertedNoIntrMethod; typedef NeoEspBitBangMethodBase NeoEsp8266BitBangTm1829InvertedNoIntrMethod; diff --git a/src/internal/methods/NeoNrf52xMethod.h b/src/internal/methods/NeoNrf52xMethod.h index 5a509ba..64bfae3 100644 --- a/src/internal/methods/NeoNrf52xMethod.h +++ b/src/internal/methods/NeoNrf52xMethod.h @@ -58,6 +58,18 @@ public: const static PinStatus IdleLevel = LOW; }; +// count 1 = 0.0625us, so max count (32768) is 2048us +class NeoNrf52xPwmSpeedWs2805 +{ +public: + const static uint32_t CountTop = 26UL; // ~1.525us (target is 1.65us) + const static nrf_pwm_values_common_t Bit0 = 6 | 0x8000; // ~0.375us (target is 0.35) + const static nrf_pwm_values_common_t Bit1 = 21 | 0x8000; // ~1.3125us (target is 1.350) + const static nrf_pwm_values_common_t BitReset = 0x8000; // LOW + const static uint32_t CountReset = 240; // 300us / 1.25us pulse width + const static PinStatus IdleLevel = LOW; +}; + class NeoNrf52xPwmSpeedSk6812 { public: @@ -169,6 +181,17 @@ public: const static PinStatus IdleLevel = HIGH; }; +class NeoNrf52xPwmInvertedSpeedWs2805 +{ +public: + const static uint32_t CountTop = 26UL; // ~1.525us (target is 1.65us) + const static nrf_pwm_values_common_t Bit0 = 6; // ~0.375us (target is 0.35) + const static nrf_pwm_values_common_t Bit1 = 21; // ~1.3125us (target is 1.350) + const static nrf_pwm_values_common_t BitReset = 0x0000; // HIGH + const static uint32_t CountReset = 240; // 300us / 1.25us pulse width + const static PinStatus IdleLevel = HIGH; +}; + class NeoNrf52xPwmInvertedSpeedSk6812 { public: @@ -525,6 +548,7 @@ private: typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2811Method; typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2812xMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2816Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2805Method; typedef NeoNrf52xMethodBase NeoNrf52xPwmNSk6812Method; typedef NeoNrf52xMethodBase NeoNrf52xPwmNTm1814Method; typedef NeoNrf52xMethodBase NeoNrf52xPwmNTm1829Method; @@ -537,6 +561,7 @@ typedef NeoNrf52xMethodBase NeoNrf52xPw typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2811Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2812xMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2816Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2805Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Sk6812Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Tm1814Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Tm1829Method; @@ -549,6 +574,7 @@ typedef NeoNrf52xMethodBase NeoNrf52xPw typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2811Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2812xMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2816Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2805Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Sk6812Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Tm1814Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Tm1829Method; @@ -561,6 +587,7 @@ typedef NeoNrf52xMethodBase NeoNrf52xPw typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2811Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2812xMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2816Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2805Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Sk6812Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Tm1814Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Tm1829Method; @@ -574,6 +601,7 @@ typedef NeoNrf52xMethodBase NeoNrf52xPw typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2811Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2812xMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2816Method; +typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2805Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Sk6812Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Tm1814Method; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Tm1829Method; @@ -588,6 +616,7 @@ typedef NeoNrf52xMethodBase NeoNrf52xPw typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2811InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2812xInvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2816InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwmNWs2805InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwmNSk6812InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwmNTm1814InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwmNTm1829InvertedMethod; @@ -600,6 +629,7 @@ typedef NeoNrf52xMethodBase Neo typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2811InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2812xInvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2816InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwm0Ws2805InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Sk6812InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Tm1814InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm0Tm1829InvertedMethod; @@ -612,6 +642,7 @@ typedef NeoNrf52xMethodBase Neo typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2811InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2812xInvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2816InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwm1Ws2805InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Sk6812InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Tm1814InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm1Tm1829InvertedMethod; @@ -624,6 +655,7 @@ typedef NeoNrf52xMethodBase Neo typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2811InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2812xInvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2816InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwm2Ws2805InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Sk6812InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Tm1814InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm2Tm1829InvertedMethod; @@ -637,6 +669,7 @@ typedef NeoNrf52xMethodBase Neo typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2811InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2812xInvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2816InvertedMethod; +typedef NeoNrf52xMethodBase NeoNrf52xPwm3Ws2805InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Sk6812InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Tm1814InvertedMethod; typedef NeoNrf52xMethodBase NeoNrf52xPwm3Tm1829InvertedMethod; @@ -653,6 +686,7 @@ typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2812xMethod; typedef NeoNrf52xPwm2800KbpsMethod NeoWs2812Method; typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2811Method; typedef NeoNrf52xPwm2Ws2812xMethod NeoWs2816Method; +typedef NeoNrf52xPwm2Ws2805Method NeoWs2805Method; typedef NeoNrf52xPwm2Sk6812Method NeoSk6812Method; typedef NeoNrf52xPwm2Tm1814Method NeoTm1814Method; typedef NeoNrf52xPwm2Tm1829Method NeoTm1829Method; @@ -669,6 +703,7 @@ typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2812xInvertedMethod; typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2811InvertedMethod; typedef NeoNrf52xPwm2800KbpsInvertedMethod NeoWs2812InvertedMethod; typedef NeoNrf52xPwm2Ws2812xInvertedMethod NeoWs2816InvertedMethod; +typedef NeoNrf52xPwm2Ws2805InvertedMethod NeoWs2805InvertedMethod; typedef NeoNrf52xPwm2Sk6812InvertedMethod NeoSk6812InvertedMethod; typedef NeoNrf52xPwm2Tm1814InvertedMethod NeoTm1814InvertedMethod; typedef NeoNrf52xPwm2Tm1829InvertedMethod NeoTm1829InvertedMethod; diff --git a/src/internal/methods/Rp2040/NeoRp2040PioSpeed.h b/src/internal/methods/Rp2040/NeoRp2040PioSpeed.h index a7b97e8..d21668b 100644 --- a/src/internal/methods/Rp2040/NeoRp2040PioSpeed.h +++ b/src/internal/methods/Rp2040/NeoRp2040PioSpeed.h @@ -44,6 +44,13 @@ public: static constexpr uint32_t ResetTimeUs = 300; }; +class NeoRp2040PioSpeedWs2805 : public NeoRp2040PioMonoProgram +{ +public: + static constexpr float BitRateHz = 588235.29f; // 350+1350 + static constexpr uint32_t ResetTimeUs = 300; +}; + class NeoRp2040PioSpeedSk6812 : public NeoRp2040PioMonoProgram { public: diff --git a/src/internal/methods/Rp2040/NeoRp2040x4Method.h b/src/internal/methods/Rp2040/NeoRp2040x4Method.h index 42d5f28..ec34338 100644 --- a/src/internal/methods/Rp2040/NeoRp2040x4Method.h +++ b/src/internal/methods/Rp2040/NeoRp2040x4Method.h @@ -316,6 +316,7 @@ private: typedef NeoRp2040x4MethodBase Rp2040x4NWs2811Method; typedef NeoRp2040x4MethodBase Rp2040x4NWs2812xMethod; typedef NeoRp2040x4MethodBase Rp2040x4NWs2816Method; +typedef NeoRp2040x4MethodBase Rp2040x4NWs2805Method; typedef NeoRp2040x4MethodBase Rp2040x4NSk6812Method; typedef NeoRp2040x4MethodBase Rp2040x4NTm1814Method; typedef NeoRp2040x4MethodBase Rp2040x4NTm1829Method; @@ -329,6 +330,7 @@ typedef NeoRp2040x4MethodBase R typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2811Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2812xMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2816Method; +typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2805Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Sk6812Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Tm1814Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Tm1829Method; @@ -342,6 +344,7 @@ typedef NeoRp2040x4MethodBase R typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2811Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2812xMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2816Method; +typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2805Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Sk6812Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Tm1814Method; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Tm1829Method; @@ -356,6 +359,7 @@ typedef NeoRp2040x4MethodBase R typedef NeoRp2040x4MethodBase Rp2040x4NWs2811InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4NWs2812xInvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4NWs2816InvertedMethod; +typedef NeoRp2040x4MethodBase Rp2040x4NWs2805InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4NSk6812InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4NTm1814InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4NTm1829InvertedMethod; @@ -369,6 +373,7 @@ typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2811InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2812xInvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2816InvertedMethod; +typedef NeoRp2040x4MethodBase Rp2040x4Pio0Ws2805InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Sk6812InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Tm1814InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio0Tm1829InvertedMethod; @@ -382,6 +387,7 @@ typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2811InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2812xInvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2816InvertedMethod; +typedef NeoRp2040x4MethodBase Rp2040x4Pio1Ws2805InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Sk6812InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Tm1814InvertedMethod; typedef NeoRp2040x4MethodBase Rp2040x4Pio1Tm1829InvertedMethod; @@ -398,6 +404,7 @@ typedef Rp2040x4Pio1Ws2812xMethod NeoWs2812xMethod; typedef Rp2040x4Pio1800KbpsMethod NeoWs2812Method; typedef Rp2040x4Pio1Ws2812xMethod NeoWs2811Method; typedef Rp2040x4Pio1Ws2812xMethod NeoWs2816Method; +typedef Rp2040x4Pio1Ws2805Method NeoWs2805Method; typedef Rp2040x4Pio1Sk6812Method NeoSk6812Method; typedef Rp2040x4Pio1Tm1814Method NeoTm1814Method; typedef Rp2040x4Pio1Tm1829Method NeoTm1829Method; @@ -415,6 +422,7 @@ typedef Rp2040x4Pio1Ws2812xInvertedMethod NeoWs2812xInvertedMethod; typedef Rp2040x4Pio1Ws2812xInvertedMethod NeoWs2811InvertedMethod; typedef Rp2040x4Pio1800KbpsInvertedMethod NeoWs2812InvertedMethod; typedef Rp2040x4Pio1Ws2812xInvertedMethod NeoWs2816InvertedMethod; +typedef Rp2040x4Pio1Ws2805InvertedMethod NeoWs2805InvertedMethod; typedef Rp2040x4Pio1Sk6812InvertedMethod NeoSk6812InvertedMethod; typedef Rp2040x4Pio1Tm1814InvertedMethod NeoTm1814InvertedMethod; typedef Rp2040x4Pio1Tm1829InvertedMethod NeoTm1829InvertedMethod; diff --git a/src/internal/methods/Tlc59711GenericMethod.h b/src/internal/methods/Tlc59711GenericMethod.h index fdf0b86..fafb7da 100644 --- a/src/internal/methods/Tlc59711GenericMethod.h +++ b/src/internal/methods/Tlc59711GenericMethod.h @@ -99,7 +99,7 @@ public: { while (!IsReadyToUpdate()) { -#if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) +#if !defined(ARDUINO_TEEONARDU_LEO) && !defined(ARDUINO_TEEONARDU_FLORA) && !defined(ARDUINO_AVR_DIGISPARK) yield(); // allows for system yield if needed #endif }