Skip to content

Commit

Permalink
Merge pull request #213 from julio-matarranz/fix/dongle-switch-off
Browse files Browse the repository at this point in the history
fix #210 implement Switch off screen on Lilygo dongle
  • Loading branch information
BitMaker-hub authored Nov 27, 2023
2 parents d7b5456 + 2f34d5f commit abfa17d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ build_flags =
-DNERMINER_S3_DONGLE
-DBOARD_HAS_PSRAM
-DARDUINO_USB_CDC_ON_BOOT
-DTFT_BACKLIGHT_ON=LOW
-DTFT_BL=38
lib_deps =
https://github.com/takkaO/OpenFontRender
bblanchon/ArduinoJson@^6.21.2
Expand Down
3 changes: 3 additions & 0 deletions src/drivers/displays/dongleDisplayDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,9 @@ void dongleDisplay_Init(void)

void dongleDisplay_AlternateScreenState(void)
{
int screen_state = digitalRead(TFT_BL);
Serial.println("Switching display state");
digitalWrite(TFT_BL, !screen_state);
}

void dongleDisplay_AlternateRotation(void)
Expand Down

0 comments on commit abfa17d

Please sign in to comment.