From 20438187b14e96a1f53bab3faa60dc946d2d73fb Mon Sep 17 00:00:00 2001 From: C47D Date: Sat, 11 Sep 2021 13:51:21 -0500 Subject: [PATCH] Revert "feat(st7789.c): Initial support for display rotation control using LVGL" This reverts commit 704f9a2c7f65dac47ba9b1a69aaf4d8dfe5c53ee. --- lvgl_tft/st7789.c | 25 ++----------------------- 1 file changed, 2 insertions(+), 23 deletions(-) diff --git a/lvgl_tft/st7789.c b/lvgl_tft/st7789.c index e990c06..4b3b718 100644 --- a/lvgl_tft/st7789.c +++ b/lvgl_tft/st7789.c @@ -122,22 +122,6 @@ void st7789_enable_backlight(lv_disp_drv_t *drv, bool backlight) * account that gap, this is not necessary in all orientations. */ void st7789_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * color_map) { - static lv_disp_rot_t prev_rotation = LV_DISP_ROT_NONE; - - lv_disp_t *display = (lv_disp_t *) drv; - lv_disp_rot_t rotation = lv_disp_get_rotation(display); - - if (rotation != prev_rotation) { - /* Update rotation */ - - /* TODO Handle all other rotations */ - if (LV_DISP_ROT_180 == rotation) { - st7789_set_orientation(drv, 1); - } - - prev_rotation = rotation; - } - uint8_t data[4] = {0}; uint16_t offsetx1 = area->x1; @@ -154,13 +138,8 @@ void st7789_flush(lv_disp_drv_t * drv, const lv_area_t * area, lv_color_t * colo #elif (LV_HOR_RES_MAX == 240) && (LV_VER_RES_MAX == 240) #if (CONFIG_LV_DISPLAY_ORIENTATION_PORTRAIT) - if (LV_DISP_ROT_NONE == rotation) { - offsetx1 += 80; - offsetx2 += 80; - } - else { - - } + offsetx1 += 80; + offsetx2 += 80; #elif (CONFIG_LV_DISPLAY_ORIENTATION_LANDSCAPE_INVERTED) offsety1 += 80; offsety2 += 80;