Skip to content

Commit

Permalink
#46
Browse files Browse the repository at this point in the history
  • Loading branch information
moononournation committed Feb 3, 2022
1 parent dc5180d commit 7a21df2
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/display/Arduino_ST7796.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,20 +29,17 @@ void Arduino_ST7796::setRotation(uint8_t r)
switch (_rotation)
{
case 1:
// r = ST7796_MADCTL_MY | ST7796_MADCTL_MV | ST7796_MADCTL_BGR | ST7796_MADCTL_MH;
r = ST7796_MADCTL_MX | ST7796_MADCTL_MY | ST7796_MADCTL_MV | ST7796_MADCTL_BGR;
r = ST7796_MADCTL_MV | ST7796_MADCTL_BGR;
break;
case 2:
r = ST7796_MADCTL_MX | ST7796_MADCTL_ML | ST7796_MADCTL_BGR | ST7796_MADCTL_MH;
r = ST7796_MADCTL_MX | ST7796_MADCTL_BGR;
r = ST7796_MADCTL_MY | ST7796_MADCTL_BGR;
break;
case 3:
// r = ST7796_MADCTL_MX | ST7796_MADCTL_MV | ST7796_MADCTL_BGR | ST7796_MADCTL_MH;
r = ST7796_MADCTL_MV | ST7796_MADCTL_BGR;
r = ST7796_MADCTL_MX | ST7796_MADCTL_MY | ST7796_MADCTL_MV | ST7796_MADCTL_BGR;
break;
default: // case 0:
// r = ST7796_MADCTL_MX | ST7796_MADCTL_MY | ST7796_MADCTL_BGR | ST7796_MADCTL_MH;
r = ST7796_MADCTL_MY | ST7796_MADCTL_BGR;
r = ST7796_MADCTL_MX | ST7796_MADCTL_ML | ST7796_MADCTL_BGR | ST7796_MADCTL_MH;
r = ST7796_MADCTL_MX | ST7796_MADCTL_BGR;
break;
}
_bus->beginWrite();
Expand Down

0 comments on commit 7a21df2

Please sign in to comment.