Rotate the screen so the USB connector is on the right if the board is T-Embed

This commit is contained in:
Nilson Santos 2024-01-10 19:10:08 -03:00
parent 8f0e4ff7e0
commit 2694092589

View File

@ -20,7 +20,11 @@ TFT_eSprite background = TFT_eSprite(&tft); // Invoke library sprite
void tDisplay_Init(void) void tDisplay_Init(void)
{ {
tft.init(); tft.init();
#ifdef LILYGO_S3_T_EMBED
tft.setRotation(3);
#else
tft.setRotation(1); tft.setRotation(1);
#endif
tft.setSwapBytes(true); // Swap the colour byte order when rendering tft.setSwapBytes(true); // Swap the colour byte order when rendering
background.createSprite(WIDTH, HEIGHT); // Background Sprite background.createSprite(WIDTH, HEIGHT); // Background Sprite
background.setSwapBytes(true); background.setSwapBytes(true);