diff --git a/tasmota/tasmota_globals.h b/tasmota/tasmota_globals.h index 47a1c0b83..2a88b4131 100644 --- a/tasmota/tasmota_globals.h +++ b/tasmota/tasmota_globals.h @@ -61,6 +61,78 @@ String EthernetMacAddress(void); #include "tasmota_configurations.h" // Preconfigured configurations +/*********************************************************************************************\ + * ESP8266 specific parameters +\*********************************************************************************************/ + +#ifdef ESP8266 + +#ifndef MODULE +#define MODULE SONOFF_BASIC // [Module] Select default model +#endif +#ifndef FALLBACK_MODULE +#define FALLBACK_MODULE SONOFF_BASIC // [Module2] Select default module on fast reboot where USER_MODULE is user template +#endif + +#ifndef ARDUINO_ESP8266_RELEASE +#define ARDUINO_CORE_RELEASE "STAGE" +#else +#define ARDUINO_CORE_RELEASE ARDUINO_ESP8266_RELEASE +#endif // ARDUINO_ESP8266_RELEASE + +#ifndef USE_ADC_VCC +#define USE_ADC +#else +#undef USE_ADC +#endif + +#endif // ESP8266 + +/*********************************************************************************************\ + * ESP32 specific parameters +\*********************************************************************************************/ + +#ifdef ESP32 + +#ifndef MODULE +#define MODULE WEMOS // [Module] Select default model +#endif +#ifndef FALLBACK_MODULE +#define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template +#endif + +#ifndef ARDUINO_ESP32_RELEASE +#define ARDUINO_CORE_RELEASE "STAGE" +#else +#define ARDUINO_CORE_RELEASE ARDUINO_ESP32_RELEASE +#endif // ARDUINO_ESP32_RELEASE + +// Hardware has no ESP32 +#undef USE_TUYA_DIMMER +#undef USE_PWM_DIMMER +#undef USE_EXS_DIMMER +#undef USE_ARMTRONIX_DIMMERS +#undef USE_SONOFF_RF +#undef USE_SONOFF_SC +#undef USE_SONOFF_IFAN +#undef USE_SONOFF_L1 +#undef USE_SONOFF_D1 +#undef USE_SHELLY_DIMMER +#undef USE_RF_FLASH + +// Not ported (yet) +#undef USE_DISCOVERY +#undef USE_MY92X1 +#undef USE_TUYA_MCU +#undef USE_PS_16_DZ + +#undef USE_HM10 // Disable support for HM-10 as a BLE-bridge as an alternative is using the internal ESP32 BLE +#undef USE_KEELOQ // Disable support for Jarolift rollers by Keeloq algorithm as it's library cc1101 is not compatible with ESP32 +//#undef USE_DISPLAY_ILI9488 // Disable as it's library JaretBurkett_ILI9488-gemu-1.0 is not compatible with ESP32 +//#undef USE_DISPLAY_SSD1351 // Disable as it's library Adafruit_SSD1351_gemu-1.0 is not compatible with ESP32 + +#endif // ESP32 + /*********************************************************************************************\ * Mandatory defines satisfying disabled defines \*********************************************************************************************/ @@ -324,59 +396,6 @@ const char kWebColors[] PROGMEM = COLOR_BUTTON_TEXT "|" COLOR_BUTTON "|" COLOR_BUTTON_HOVER "|" COLOR_BUTTON_RESET "|" COLOR_BUTTON_RESET_HOVER "|" COLOR_BUTTON_SAVE "|" COLOR_BUTTON_SAVE_HOVER "|" COLOR_TIMER_TAB_TEXT "|" COLOR_TIMER_TAB_BACKGROUND "|" COLOR_TITLE_TEXT; -/*********************************************************************************************\ - * ESP8266 specific parameters -\*********************************************************************************************/ - -#ifdef ESP8266 - -#ifndef MODULE -#define MODULE SONOFF_BASIC // [Module] Select default model -#endif -#ifndef FALLBACK_MODULE -#define FALLBACK_MODULE SONOFF_BASIC // [Module2] Select default module on fast reboot where USER_MODULE is user template -#endif - -#ifndef ARDUINO_ESP8266_RELEASE -#define ARDUINO_CORE_RELEASE "STAGE" -#else -#define ARDUINO_CORE_RELEASE ARDUINO_ESP8266_RELEASE -#endif // ARDUINO_ESP8266_RELEASE - -#ifndef USE_ADC_VCC -#define USE_ADC -#else -#undef USE_ADC -#endif - -#endif // ESP8266 - -/*********************************************************************************************\ - * ESP32 specific parameters -\*********************************************************************************************/ - -#ifdef ESP32 - -#ifndef MODULE -#define MODULE WEMOS // [Module] Select default model -#endif -#ifndef FALLBACK_MODULE -#define FALLBACK_MODULE WEMOS // [Module2] Select default module on fast reboot where USER_MODULE is user template -#endif - -#ifndef ARDUINO_ESP32_RELEASE -#define ARDUINO_CORE_RELEASE "STAGE" -#else -#define ARDUINO_CORE_RELEASE ARDUINO_ESP32_RELEASE -#endif // ARDUINO_ESP32_RELEASE - -#undef USE_HM10 // Disable support for HM-10 as a BLE-bridge as an alternative is using the internal ESP32 BLE -#undef USE_KEELOQ // Disable support for Jarolift rollers by Keeloq algorithm as it's library cc1101 is not compatible with ESP32 -//#undef USE_DISPLAY_ILI9488 // Disable as it's library JaretBurkett_ILI9488-gemu-1.0 is not compatible with ESP32 -//#undef USE_DISPLAY_SSD1351 // Disable as it's library Adafruit_SSD1351_gemu-1.0 is not compatible with ESP32 - -#endif // ESP32 - /*********************************************************************************************\ * Macros \*********************************************************************************************/ diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index 4adfe3f38..f302ed288 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -20,29 +20,6 @@ #ifndef _TASMOTA_TEMPLATE_H_ #define _TASMOTA_TEMPLATE_H_ -#ifdef ESP32 - -// Hardware has no ESP32 -#undef USE_TUYA_DIMMER -#undef USE_PWM_DIMMER -#undef USE_EXS_DIMMER -#undef USE_ARMTRONIX_DIMMERS -#undef USE_SONOFF_RF -#undef USE_SONOFF_SC -#undef USE_SONOFF_IFAN -#undef USE_SONOFF_L1 -#undef USE_SONOFF_D1 -#undef USE_SHELLY_DIMMER -#undef USE_RF_FLASH - -// Not ported (yet) -#undef USE_DISCOVERY -#undef USE_MY92X1 -#undef USE_TUYA_MCU -#undef USE_PS_16_DZ - -#endif // ESP32 - // User selectable GPIO functionality // ATTENTION: Only add at the end of this list just before GPIO_SENSOR_END // Then add the same name(s) in a nice location in array kGpioNiceList