Better check for existing Ethernet support in Arduino libs (#22473)

* use IDF var for eth check
This commit is contained in:
Jason2866 2024-11-12 21:49:36 +01:00 committed by GitHub
parent 88810fc92c
commit 50b6f74295
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View File

@ -189,10 +189,12 @@
#undef USE_ESP32_WDT // disable watchdog on SAFEBOOT until more testing is done #undef USE_ESP32_WDT // disable watchdog on SAFEBOOT until more testing is done
#if CONFIG_FREERTOS_UNICORE || CONFIG_IDF_TARGET_ESP32S3 #if CONFIG_FREERTOS_UNICORE || CONFIG_IDF_TARGET_ESP32S3
#if CONFIG_ETH_ENABLED // Check for Ethernet support in Arduino libs
// #undef USE_MQTT_TLS // #undef USE_MQTT_TLS
// #define USE_SERIAL_BRIDGE // Add support for software Serial Bridge console Tee (+4.5k code) // #define USE_SERIAL_BRIDGE // Add support for software Serial Bridge console Tee (+4.5k code)
#define USE_SPI // Make SPI Ethernet adapters useable (+124 bytes) #define USE_SPI // Make SPI Ethernet adapters useable (+124 bytes)
#define USE_ETHERNET #define USE_ETHERNET
#endif // CONFIG_ETH_ENABLED
#endif // CONFIG_FREERTOS_UNICORE || CONFIG_IDF_TARGET_ESP32S3 #endif // CONFIG_FREERTOS_UNICORE || CONFIG_IDF_TARGET_ESP32S3
#endif // FIRMWARE_SAFEBOOT #endif // FIRMWARE_SAFEBOOT
@ -830,15 +832,15 @@
#endif // USE_MATTER_DEVICE #endif // USE_MATTER_DEVICE
/*********************************************************************************************\ /*********************************************************************************************\
* Post-process compile options for esp32-c2 * Post-process for switched off Ethernet support in Arduino static libs
\*********************************************************************************************/ \*********************************************************************************************/
#ifdef CONFIG_IDF_TARGET_ESP32C2 #ifndef CONFIG_ETH_ENABLED
#undef USE_ETHERNET #undef USE_ETHERNET
#ifdef FIRMWARE_MINIMAL #ifdef FIRMWARE_MINIMAL
#undef USE_SPI #undef USE_SPI
#endif // FIRMWARE_MINIMAL #endif // FIRMWARE_MINIMAL
#endif // CONFIG_IDF_TARGET_ESP32C2 #endif // CONFIG_ETH_ENABLED
#endif // ESP32 #endif // ESP32
#endif // _TASMOTA_CONFIGURATIONS_ESP32_H_ #endif // _TASMOTA_CONFIGURATIONS_ESP32_H_

View File

@ -18,7 +18,8 @@
*/ */
#ifdef ESP32 #ifdef ESP32
#ifndef CONFIG_IDF_TARGET_ESP32C2 #include "sdkconfig.h"
#ifdef CONFIG_ETH_ENABLED
#ifdef USE_ETHERNET #ifdef USE_ETHERNET
/*********************************************************************************************\ /*********************************************************************************************\
* Ethernet support for ESP32 * Ethernet support for ESP32