* Update WebSocket library * Update SSDP library * Update TFT_eSPI library * Update EspLuaEngine library * Update SDFat library * Change to pioarduino * Make ESP3DMessageFIFO and ESP3DMessage more thread safe * Fix sanity checks for BT * Add some C6 support * Refactor ethernet code * Split Ethernet Sta / WiFi sta ESP Commands and settings * Simplify wait and wdtFeed code * Set C3 with 4MB by default in platformio.ini * Apply Disable brown out only on ESP32 to avoid crash e.g:ESP32S3 * Add missing entries in platformio.ini
34 lines
751 B
C
34 lines
751 B
C
|
|
// This is the command sequence that rotates the SSD1351 driver coordinate frame
|
|
|
|
rotation = m % 4; // Limit the range of values to 0-3
|
|
|
|
uint8_t madctl = 0x64;
|
|
|
|
switch (rotation) {
|
|
case 0:
|
|
madctl |= 0x10;
|
|
_width = _init_width;
|
|
_height = _init_height;
|
|
break;
|
|
case 1:
|
|
madctl |= 0x13;
|
|
_width = _init_height;
|
|
_height = _init_width;
|
|
break;
|
|
case 2:
|
|
madctl |= 0x02;
|
|
_width = _init_width;
|
|
_height = _init_height;
|
|
break;
|
|
case 3:
|
|
madctl |= 0x01;
|
|
_width = _init_height;
|
|
_height = _init_width;
|
|
break;
|
|
}
|
|
|
|
writecommand(0xA0); // SETREMAP
|
|
writedata(madctl);
|
|
writecommand(0xA1); // STARTLINE
|
|
writedata(rotation < 2 ? TFT_HEIGHT : 0);
|