acidportal- 😈 Worlds smallest Evil Portal on a LilyGo T-QT |
git clone git://git.acid.vegas/acidportal.git |
Log | Files | Refs | Archive | README | LICENSE |
ILI9481_Rotation.h (751B)
1 // This is the command sequence that rotates the ILI9481 driver coordinate frame 2 3 writecommand(TFT_MADCTL); 4 rotation = m % 4; 5 switch (rotation) { 6 case 0: // Portrait 7 writedata(TFT_MAD_BGR | TFT_MAD_SS); 8 _width = TFT_WIDTH; 9 _height = TFT_HEIGHT; 10 break; 11 case 1: // Landscape (Portrait + 90) 12 writedata(TFT_MAD_MV | TFT_MAD_BGR); 13 _width = TFT_HEIGHT; 14 _height = TFT_WIDTH; 15 break; 16 case 2: // Inverter portrait 17 writedata(TFT_MAD_BGR | TFT_MAD_GS); 18 _width = TFT_WIDTH; 19 _height = TFT_HEIGHT; 20 break; 21 case 3: // Inverted landscape 22 writedata(TFT_MAD_MV | TFT_MAD_BGR | TFT_MAD_SS | TFT_MAD_GS); 23 _width = TFT_HEIGHT; 24 _height = TFT_WIDTH; 25 break; 26 } 27