diff --git a/src/tftinstance.cpp b/src/tftinstance.cpp index 4b6e7b4..9cb17f5 100644 --- a/src/tftinstance.cpp +++ b/src/tftinstance.cpp @@ -2,4 +2,4 @@ namespace espgui { TFT_eSPI tft; -} +} // namespace espgui diff --git a/src/tftinstance.h b/src/tftinstance.h index 87ec58b..07cc6a6 100644 --- a/src/tftinstance.h +++ b/src/tftinstance.h @@ -5,4 +5,8 @@ namespace espgui { extern TFT_eSPI tft; +inline bool isLandscape() +{ + return (tft.getRotation() == 1 || tft.getRotation() == 3); +} }