From 0bddfad14e9549c646513ce4e68d42f669170456 Mon Sep 17 00:00:00 2001 From: Jason2866 <24528715+Jason2866@users.noreply.github.com> Date: Tue, 25 Jun 2024 15:13:16 +0200 Subject: [PATCH] No Ethernet support for the C2 (#21691) * No Ethernet for the C2 * Post process: Disable always Ethernet for C2 * better check for Ethernet available * typo * excluse c2 with `ifndef` --- .../ESP-Mail-Client/src/extras/Networks_Provider.h | 2 +- tasmota/include/tasmota_configurations_ESP32.h | 8 ++++++++ tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h b/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h index fd523be67..8e55a735d 100644 --- a/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h +++ b/lib/libesp32/ESP-Mail-Client/src/extras/Networks_Provider.h @@ -75,7 +75,7 @@ #if !defined(ESP_MAIL_DISABLE_NATIVE_ETHERNET) -#if defined(ESP32) && __has_include() +#if defined(ESP32) && __has_include() #include #define ESP_MAIL_ETH_IS_AVAILABLE #elif defined(ESP8266) && defined(ESP8266_CORE_SDK_V3_X_X) diff --git a/tasmota/include/tasmota_configurations_ESP32.h b/tasmota/include/tasmota_configurations_ESP32.h index c323ec5f0..f6ac7fc22 100644 --- a/tasmota/include/tasmota_configurations_ESP32.h +++ b/tasmota/include/tasmota_configurations_ESP32.h @@ -825,5 +825,13 @@ #endif // USE_MATTER_DEVICE +/*********************************************************************************************\ + * Post-process compile options for esp32-c2 +\*********************************************************************************************/ + +#ifdef CONFIG_IDF_TARGET_ESP32C2 + #undef USE_ETHERNET +#endif // CONFIG_IDF_TARGET_ESP32C2 + #endif // ESP32 #endif // _TASMOTA_CONFIGURATIONS_ESP32_H_ diff --git a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino index b44be11f3..a9e7ed17c 100644 --- a/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino +++ b/tasmota/tasmota_xdrv_driver/xdrv_82_esp32_ethernet.ino @@ -18,7 +18,7 @@ */ #ifdef ESP32 -//#if CONFIG_IDF_TARGET_ESP32 +#ifndef CONFIG_IDF_TARGET_ESP32C2 #ifdef USE_ETHERNET /*********************************************************************************************\ * Ethernet support for ESP32 @@ -445,5 +445,5 @@ bool Xdrv82(uint32_t function) { } #endif // USE_ETHERNET -//#endif // CONFIG_IDF_TARGET_ESP32 +#endif // CONFIG_IDF_TARGET_ESP32C2 #endif // ESP32