acidportal- 😈 Worlds smallest Evil Portal on a LilyGo T-QT |
git clone git://git.acid.vegas/acidportal.git |
Log | Files | Refs | Archive | README | LICENSE |
ILI9225_Rotation.h (1214B)
1 2 // This is the command sequence that rotates the ILI9225 driver coordinate frame 3 4 rotation = m % 4; // Limit the range of values to 0-3 5 6 switch (rotation) { 7 case 0: 8 writecommand(ILI9225_DRIVER_OUTPUT_CTRL); 9 writedata(0x01);writedata(0x1C); 10 writecommand(ILI9225_ENTRY_MODE); 11 writedata(TFT_MAD_COLOR_ORDER);writedata(0x30); 12 _width = _init_width; 13 _height = _init_height; 14 break; 15 case 1: 16 writecommand(ILI9225_DRIVER_OUTPUT_CTRL); 17 writedata(0x00);writedata(0x1C); 18 writecommand(ILI9225_ENTRY_MODE); 19 writedata(TFT_MAD_COLOR_ORDER);writedata(0x38); 20 _width = _init_height; 21 _height = _init_width; 22 break; 23 case 2: 24 writecommand(ILI9225_DRIVER_OUTPUT_CTRL); 25 writedata(0x02);writedata(0x1C); 26 writecommand(ILI9225_ENTRY_MODE); 27 writedata(TFT_MAD_COLOR_ORDER);writedata(0x30); 28 _width = _init_width; 29 _height = _init_height; 30 break; 31 case 3: 32 writecommand(ILI9225_DRIVER_OUTPUT_CTRL); 33 writedata(0x03);writedata(0x1C); 34 writecommand(ILI9225_ENTRY_MODE); 35 writedata(TFT_MAD_COLOR_ORDER);writedata(0x38); 36 _width = _init_height; 37 _height = _init_width; 38 break; 39 }