diff --git a/cpu/esp32/Makefile.dep b/cpu/esp32/Makefile.dep index 4f9704264c..a371093516 100644 --- a/cpu/esp32/Makefile.dep +++ b/cpu/esp32/Makefile.dep @@ -12,6 +12,7 @@ ifneq (,$(filter esp_eth,$(USEMODULE))) USEMODULE += netdev_eth USEMODULE += netopt USEMODULE += riot_freertos + USEMODULE += xtimer INCLUDES += -I$(RIOTCPU)/$(CPU)/vendor/esp-idf/include/ethernet INCLUDES += -I$(ESP32_SDK_DIR)/components/ethernet/include endif @@ -38,6 +39,7 @@ ifneq (,$(filter esp_wifi_any,$(USEMODULE))) USEMODULE += esp_idf_wpa_supplicant_port USEMODULE += esp_idf_nvs_flash USEMODULE += riot_freertos + USEMODULE += xtimer # crypto and hashes produce symbol conflicts with esp_idf_wpa_supplicant_crypto DISABLE_MODULE += crypto @@ -50,11 +52,6 @@ ifneq (,$(filter esp_idf_nvs_flash,$(USEMODULE))) USEMODULE += pthread endif -ifneq (,$(filter riot_freertos,$(USEMODULE))) - # add additional modules required by riot_freertos - USEMODULE += xtimer -endif - ifneq (,$(filter periph_i2c,$(USEMODULE))) ifneq (,$(filter esp_i2c_hw,$(USEMODULE))) USEMODULE += core_thread_flags @@ -89,7 +86,6 @@ endif ifneq (,$(filter shell,$(USEMODULE))) USEMODULE += ps - USEMODULE += xtimer endif # if SPI RAM is enabled, ESP-IDF heap and quot flash mode have to be used diff --git a/cpu/esp32/freertos/timers.c b/cpu/esp32/freertos/timers.c index ef4a2f135a..8ecf2779e6 100644 --- a/cpu/esp32/freertos/timers.c +++ b/cpu/esp32/freertos/timers.c @@ -10,6 +10,8 @@ #ifndef DOXYGEN +#ifdef MODULE_XTIMER + #define ENABLE_DEBUG 0 #include "debug.h" @@ -103,4 +105,6 @@ BaseType_t xTimerStop (TimerHandle_t xTimer, TickType_t xBlockTime) return pdTRUE; } +#endif /* MODULE_XTIMER */ + #endif /* DOXYGEN */