From 979fb703edfd2dee5e4c86482bd4613073ad72b3 Mon Sep 17 00:00:00 2001 From: Wastl Kraus Date: Fri, 16 May 2025 23:33:27 +0200 Subject: [PATCH] Update DShotRMT.h prepare for idf update --- DShotRMT.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DShotRMT.h b/DShotRMT.h index 7713be5..ef4c547 100644 --- a/DShotRMT.h +++ b/DShotRMT.h @@ -11,6 +11,7 @@ // The RMT (Remote Control) module library is used for generating the DShot signal. #include +#include // Defines the library version constexpr auto DSHOT_LIB_VERSION = "0.2.4"; @@ -23,7 +24,7 @@ constexpr auto DSHOT_THROTTLE_MAX = 2047; constexpr auto DSHOT_NULL_PACKET = 0b0000000000000000; constexpr auto DSHOT_PAUSE = 21; // 21-bit is recommended constexpr auto DSHOT_PAUSE_BIT = 16; -constexpr auto F_CPU_RMT = APB_CLK_FREQ; +constexpr auto F_CPU_RMT = ( 80*1000000 ); //unit: Hz constexpr auto RMT_CYCLES_PER_SEC = (F_CPU_RMT / DSHOT_CLK_DIVIDER); constexpr auto RMT_CYCLES_PER_ESP_CYCLE = (F_CPU / RMT_CYCLES_PER_SEC);