mirror of
https://github.com/apache/nuttx.git
synced 2026-08-26 20:00:42 +00:00
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:
parent
c4b81bb922
commit
38652e19aa
2 changed files with 9 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue