diff --git a/drivers/lcd/Kconfig b/drivers/lcd/Kconfig index d3b54b4dda..c4401c4ce2 100644 --- a/drivers/lcd/Kconfig +++ b/drivers/lcd/Kconfig @@ -756,6 +756,15 @@ config LCD_ST7789_INVCOLOR Invert colors of the LCD display. This is useful for implementations that assume that that colors are inverted by default. +config LCD_ST7789_DEFAULT_COLOR + hex "ST7789 Default Background Color" + default 0xffff + range 0 0xffff + ---help--- + This sets the default color of ST7789 display during its initialization. + It is the color that is filled to the display and remains there unless + higher layer (framebuffer/lcd) overwrites it. + config LCD_ST7789_BGR bool "ST7789 Use BGR Instead Of RGB" default n diff --git a/drivers/lcd/st7789.c b/drivers/lcd/st7789.c index 59adb8195a..e69fb0e2cf 100644 --- a/drivers/lcd/st7789.c +++ b/drivers/lcd/st7789.c @@ -992,7 +992,7 @@ FAR struct lcd_dev_s *st7789_lcdinitialize(FAR struct spi_dev_s *spi) st7789_setorientation(priv); #endif st7789_display(priv, true); - st7789_fill(priv, 0xffff); + st7789_fill(priv, CONFIG_LCD_ST7789_DEFAULT_COLOR); return &priv->dev; }