From 3bcb8144fbd21385fa0e8d99826ade2ff42c4340 Mon Sep 17 00:00:00 2001 From: Rodrigo Garcia Date: Thu, 30 Mar 2023 00:01:51 -0300 Subject: [PATCH] Makes F_CPU generic for all SoC Based on CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ that is correctly defined in the sdkconfig file for each SoC. --- cores/esp32/esp32-hal.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/cores/esp32/esp32-hal.h b/cores/esp32/esp32-hal.h index 51ecea405df..e6dc0277935 100644 --- a/cores/esp32/esp32-hal.h +++ b/cores/esp32/esp32-hal.h @@ -42,11 +42,7 @@ extern "C" { #endif #ifndef F_CPU -#if CONFIG_IDF_TARGET_ESP32 // ESP32/PICO-D4 -#define F_CPU (CONFIG_ESP32_DEFAULT_CPU_FREQ_MHZ * 1000000U) -#elif CONFIG_IDF_TARGET_ESP32S2 -#define F_CPU (CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ * 1000000U) -#endif +#define F_CPU (CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ * 1000000U) #endif #if CONFIG_ARDUINO_ISR_IRAM