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

ILI9488_Rotation.h (751B)

      1   // This is the command sequence that rotates the ILI9488 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_BGR);
      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_MY | TFT_MAD_BGR);
     18       _width  = TFT_WIDTH;
     19       _height = TFT_HEIGHT;
     20      break;
     21    case 3: // Inverted landscape
     22      writedata(TFT_MAD_MX | TFT_MAD_MY | TFT_MAD_MV | TFT_MAD_BGR);
     23       _width  = TFT_HEIGHT;
     24       _height = TFT_WIDTH;
     25      break;
     26   }
     27