drivers/lcd/st7789: Support mirror V

Mirror X and V can rotate the screen 90 degrees.

Signed-off-by: wangjianyu3 <wangjianyu3@xiaomi.com>
This commit is contained in:
wangjianyu3 2025-04-02 00:49:39 +08:00 committed by Xiang Xiao
parent c4b81bb922
commit 38652e19aa
2 changed files with 9 additions and 1 deletions

View file

@ -749,6 +749,10 @@ config LCD_ST7789_MIRRORY
bool "ST7789 Mirror Y"
default n
config LCD_ST7789_MIRRORV
bool "ST7789 Mirror V"
default n
config LCD_ST7789_INVCOLOR
bool "ST7789 Invert Color"
default y

View file

@ -477,7 +477,11 @@ static void st7789_setorientation(FAR struct st7789_dev_s *dev)
#endif
/* Mirror X/Y for current setting */
/* Mirror X/Y/V for current setting */
#ifdef CONFIG_LCD_ST7789_MIRRORV
madctl ^= 0x20;
#endif
#ifdef CONFIG_LCD_ST7789_MIRRORX
madctl ^= 0x40;