From 2d9d8fa5c2f586470b2b2d1ead573b2ac44ab771 Mon Sep 17 00:00:00 2001 From: Theo Arends <11044339+arendst@users.noreply.github.com> Date: Sun, 20 Feb 2022 14:42:51 +0100 Subject: [PATCH] Add better ESP32 model exclusions --- tasmota/tasmota_globals.h | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/tasmota/tasmota_globals.h b/tasmota/tasmota_globals.h index 91daa87a0..e021ac664 100644 --- a/tasmota/tasmota_globals.h +++ b/tasmota/tasmota_globals.h @@ -94,27 +94,43 @@ String EthernetMacAddress(void); #ifdef ESP32 +/*-------------------------------------------------------------------------------------------*\ + * Start ESP32 specific parameters - disable features not present in ESP32 +\*-------------------------------------------------------------------------------------------*/ + +#if CONFIG_IDF_TARGET_ESP32 + +#else // Disable features not present in other ESP32 like ESP32C3, ESP32S2, ESP32S3 etc. +#ifdef USE_ETHERNET +#undef USE_ETHERNET // All non-ESP32 do not support ethernet +#endif +#endif // CONFIG_IDF_TARGET_ESP32 + +/*-------------------------------------------------------------------------------------------*\ + * End ESP32 specific parameters +\*-------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------*\ * Start ESP32-C32 specific parameters - disable features not present in ESP32-C3 \*-------------------------------------------------------------------------------------------*/ #if CONFIG_IDF_TARGET_ESP32C3 // ESP32-C3 -#ifdef USE_ETHERNET -#undef USE_ETHERNET // ESP32-C3 does not support ethernet -#endif +//#ifdef USE_ETHERNET +//#undef USE_ETHERNET // ESP32-C3 does not support ethernet +//#endif + #endif // CONFIG_IDF_TARGET_ESP32C3 /*-------------------------------------------------------------------------------------------*\ - * End ESP32-S2 specific parameters + * End ESP32-C3 specific parameters \*-------------------------------------------------------------------------------------------*/ /*-------------------------------------------------------------------------------------------*\ * Start ESP32-S2 specific parameters - disable features not present in ESP32-S2 \*-------------------------------------------------------------------------------------------*/ #if CONFIG_IDF_TARGET_ESP32S2 // ESP32-S2 -#ifdef USE_ETHERNET -#undef USE_ETHERNET // ESP32-S2 does not support ethernet -#endif +//#ifdef USE_ETHERNET +//#undef USE_ETHERNET // ESP32-S2 does not support ethernet +//#endif #ifdef USE_BLE_ESP32 #undef USE_BLE_ESP32 // ESP32-S2 does not support BLE #endif