Skip to content

Commit

Permalink
Makes F_CPU generic for all SoC (#8007)
Browse files Browse the repository at this point in the history
Based on CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ that is correctly defined in the sdkconfig file for each SoC.
  • Loading branch information
SuGlider committed Mar 31, 2023
1 parent d10ed8e commit f48cb4b
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions cores/esp32/esp32-hal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit f48cb4b

Please sign in to comment.