acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
GC9A01_Rotation.h (775B)
1 2 // This is the command sequence that rotates the GC9A01 driver coordinate frame 3 4 rotation = m % 4; 5 6 writecommand(TFT_MADCTL); 7 switch (rotation) { 8 case 0: // Portrait 9 writedata(TFT_MAD_BGR); 10 _width = _init_width; 11 _height = _init_height; 12 break; 13 case 1: // Landscape (Portrait + 90) 14 writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_BGR); 15 _width = _init_height; 16 _height = _init_width; 17 break; 18 case 2: // Inverter portrait 19 writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_BGR); 20 _width = _init_width; 21 _height = _init_height; 22 break; 23 case 3: // Inverted landscape 24 writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_BGR); 25 _width = _init_height; 26 _height = _init_width; 27 break; 28 }