diff --git a/tasmota/tasmota_template.h b/tasmota/tasmota_template.h index ae4741ff8..70bcff270 100644 --- a/tasmota/tasmota_template.h +++ b/tasmota/tasmota_template.h @@ -160,6 +160,7 @@ enum UserSelectablePins { GPIO_ZEROCROSS, #ifdef ESP32 GPIO_HALLEFFECT, + GPIO_EPD_DATA, // Base connection EPD driver #endif GPIO_SENSOR_END }; @@ -341,6 +342,7 @@ const char kSensorNames[] PROGMEM = D_SENSOR_ZEROCROSS "|" #ifdef ESP32 D_SENSOR_HALLEFFECT "|" + D_SENSOR_EPD_DATA "|" #endif ; @@ -470,6 +472,9 @@ const uint16_t kGpioNiceList[] PROGMEM = { #endif // USE_DISPLAY_TM1637 AGPIO(GPIO_BACKLIGHT), // Display backlight control AGPIO(GPIO_OLED_RESET), // OLED Display Reset +#ifdef ESP32 + AGPIO(GPIO_EPD_DATA), // Base connection EPD driver +#endif #endif // USE_DISPLAY #ifdef USE_MAX31865 diff --git a/tasmota/xdsp_16_epaper_47.ino b/tasmota/xdsp_16_esp32_epaper_47.ino similarity index 94% rename from tasmota/xdsp_16_epaper_47.ino rename to tasmota/xdsp_16_esp32_epaper_47.ino index d56651a6f..63605c42a 100644 --- a/tasmota/xdsp_16_epaper_47.ino +++ b/tasmota/xdsp_16_esp32_epaper_47.ino @@ -1,5 +1,5 @@ /* - xdsp_16_epaper_47.ino - LILIGO47 e-paper support for Tasmota + xdsp_16_esp32_epaper_47.ino - LILIGO47 e-paper support for Tasmota Copyright (C) 2021 Theo Arends, Gerhard Mutz and LILIGO @@ -17,7 +17,7 @@ along with this program. If not, see . */ - +#ifdef ESP32 #ifdef USE_DISPLAY #ifdef USE_LILYGO47 @@ -37,8 +37,8 @@ extern uint16_t bg_color; /*********************************************************************************************/ void EpdInitDriver47(void) { + if (PinUsed(GPIO_EPD_DATA)) { - if (1) { Settings.display_model = XDSP_16; if (Settings.display_width != EPD47_WIDTH) { @@ -96,5 +96,6 @@ bool Xdsp16(uint8_t function) return result; } -#endif // USE_DISPLAY_EPAPER +#endif // USE_LILYGO47 #endif // USE_DISPLAY +#endif // ESP32 \ No newline at end of file