From f09e5aad475b4459453ceac0c6abc37f4b2702f3 Mon Sep 17 00:00:00 2001 From: "J.R. Luppold" Date: Fri, 15 Jul 2022 15:10:50 -0700 Subject: [PATCH] Init lcd to RGB to match lvgl library color order --- lvgl_tft/st7735s.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lvgl_tft/st7735s.c b/lvgl_tft/st7735s.c index bd642aa..c7da196 100644 --- a/lvgl_tft/st7735s.c +++ b/lvgl_tft/st7735s.c @@ -196,11 +196,11 @@ static void st7735s_set_orientation(uint8_t orientation) assert(orientation < 4); /* - Portrait: 0xC8 = ST77XX_MADCTL_MX | ST77XX_MADCTL_MY | ST77XX_MADCTL_BGR - Landscape: 0xA8 = ST77XX_MADCTL_MY | ST77XX_MADCTL_MV | ST77XX_MADCTL_BGR + Portrait: 0xC8 = ST77XX_MADCTL_MX | ST77XX_MADCTL_MY | ST77XX_MADCTL_RGB + Landscape: 0xA8 = ST77XX_MADCTL_MY | ST77XX_MADCTL_MV | ST77XX_MADCTL_RGB Remark: "inverted" is ignored here */ - uint8_t data[] = {0xC8, 0xC8, 0xA8, 0xA8}; + uint8_t data[] = {0xC0, 0xC0, 0xA8, 0xA8}; #if (LV_USE_LOG == 1) const char *orientation_str[] = {