diff --git a/src/dev/esp32/esp32.h b/src/dev/esp32/esp32.h index 44be6a6b..90f7485a 100644 --- a/src/dev/esp32/esp32.h +++ b/src/dev/esp32/esp32.h @@ -16,9 +16,13 @@ class Esp32Device : public BaseDevice { Esp32Device() { _hostname = "plate"; - _backlight_pin = TFT_BCKL; _backlight_power = 1; _backlight_level = 100; +#ifdef TFT_BCKL + _backlight_pin = TFT_BCKL; +#else + _backlight_pin = -1; +#endif } void reboot() override; void show_info() override; diff --git a/src/dev/esp8266/esp8266.h b/src/dev/esp8266/esp8266.h index cdd6526d..458add99 100644 --- a/src/dev/esp8266/esp8266.h +++ b/src/dev/esp8266/esp8266.h @@ -17,9 +17,13 @@ class Esp8266Device : public BaseDevice { Esp8266Device() { _hostname = "plate"; - _backlight_pin = TFT_BCKL; _backlight_power = 1; _backlight_level = 100; +#ifdef TFT_BCKL + _backlight_pin = TFT_BCKL; +#else + _backlight_pin = -1; +#endif } void reboot() override;