From 430161ef60bbcad8f1309f50552adf499b39cd70 Mon Sep 17 00:00:00 2001 From: Harald Barth Date: Sun, 2 Jun 2024 21:10:57 +0200 Subject: [PATCH] ESP32: Refuse IDF5 --- DCCTimerESP.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/DCCTimerESP.cpp b/DCCTimerESP.cpp index 7ed3f28..6f64c6e 100644 --- a/DCCTimerESP.cpp +++ b/DCCTimerESP.cpp @@ -76,8 +76,13 @@ int DCCTimer::freeMemory() { #endif //////////////////////////////////////////////////////////////////////// - #ifdef ARDUINO_ARCH_ESP32 + +#include "esp_idf_version.h" +#if ESP_IDF_VERSION_MAJOR > 4 +#error "DCC-EX does not support compiling with IDF version 5.0 or later. Downgrade your ESP32 library to a version that contains version 4 Arduino ESP32 library 3.0.0 is too new. Use 2.0.9 to 2.0.17" +#endif + #include #include #include