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 |
HX8357D_Rotation.h (796B)
1 // This is the command sequence that rotates the HX8357D driver coordinate frame 2 3 writecommand(TFT_MADCTL); 4 rotation = m % 4; 5 switch (rotation) { 6 case 0: // Portrait 7 writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_COLOR_ORDER); 8 _width = _init_width; 9 _height = _init_height; 10 break; 11 case 1: // Landscape (Portrait + 90) 12 writedata(TFT_MAD_MV | TFT_MAD_MY | TFT_MAD_COLOR_ORDER); 13 _width = _init_height; 14 _height = _init_width; 15 break; 16 case 2: // Inverter portrait 17 writedata(TFT_MAD_COLOR_ORDER); 18 _width = _init_width; 19 _height = _init_height; 20 break; 21 case 3: // Inverted landscape 22 writedata(TFT_MAD_MX | TFT_MAD_MV | TFT_MAD_COLOR_ORDER); 23 _width = _init_height; 24 _height = _init_width; 25 break; 26 }