Dynamic adjustment of the orientation, switch orientation on the fly:

1. orientation is a parameter of initialize
2. y and x offset need to be adjusted with the orientaiton
3. bpp must be changed no matter what
This commit is contained in:
Simon Filgis
2023-02-01 14:41:56 +01:00
committed by Alan Carvalho de Assis
parent fc9f87824c
commit 04f8bab063
3 changed files with 109 additions and 18 deletions
+11
View File
@@ -31,6 +31,11 @@
* Pre-processor Definitions
****************************************************************************/
#define LCD_PORTRAIT 0
#define LCD_LANDSCAPE 1
#define LCD_RPORTRAIT 2
#define LCD_RLANDSCAPE 3
/****************************************************************************
* Public Types
****************************************************************************/
@@ -63,7 +68,13 @@ extern "C"
*
****************************************************************************/
#ifdef CONFIG_LCD_DYN_ORIENTATION
FAR struct lcd_dev_s *st7789_lcdinitialize(FAR struct spi_dev_s *spi,
uint8_t orientation,
uint16_t xoff, uint16_t yoff);
#else
FAR struct lcd_dev_s *st7789_lcdinitialize(FAR struct spi_dev_s *spi);
#endif
#ifdef __cplusplus
}