acidportal

- 😈 Worlds smallest Evil Portal on a LilyGo T-QT
git clone git://git.acid.vegas/acidportal.git
Log | Files | Refs | Archive | README | LICENSE

SSD1963_Rotation.h (711B)

      1 
      2 // This is the command sequence that rotates the SSD1963 driver coordinate frame
      3 
      4   rotation = m % 4; // Limit the range of values to 0-3
      5 
      6   writecommand(TFT_MADCTL);
      7   switch (rotation) {
      8     case 0:
      9       writedata(0x21 | TFT_MAD_COLOR_ORDER);
     10       _width  = _init_width;
     11       _height = _init_height;
     12       break;
     13     case 1:
     14       writedata(0x00 | TFT_MAD_COLOR_ORDER);
     15       _width  = _init_height;
     16       _height = _init_width;
     17       break;
     18     case 2:
     19       writedata(0x22 | TFT_MAD_COLOR_ORDER);
     20       _width  = _init_width;
     21       _height = _init_height;
     22       break;
     23     case 3:
     24       writedata(0x03 | TFT_MAD_COLOR_ORDER);
     25       _width  = _init_height;
     26       _height = _init_width;
     27       break;
     28 
     29   }