Skip to content

Commit

Permalink
display: Add support for an ST7789V based LCD
Browse files Browse the repository at this point in the history
This adds a driver for st7789v lcd controller, and TL019FQV01 lcd.
The bulk of the driver is based on the existing ili9340 driver.

Signed-off-by: Marc Reilly <marc@cpdesign.com.au>
  • Loading branch information
marc-cpdesign authored and MaureenHelm committed Aug 8, 2019
1 parent 3f5aae9 commit b0203ac
Show file tree
Hide file tree
Showing 7 changed files with 720 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/display/CMakeLists.txt
Expand Up @@ -8,6 +8,7 @@ zephyr_sources_ifdef(CONFIG_SDL_DISPLAY display_sdl.c)
zephyr_sources_ifdef(CONFIG_DUMMY_DISPLAY display_dummy.c) zephyr_sources_ifdef(CONFIG_DUMMY_DISPLAY display_dummy.c)
zephyr_sources_ifdef(CONFIG_FRAMEBUF_DISPLAY display_framebuf.c) zephyr_sources_ifdef(CONFIG_FRAMEBUF_DISPLAY display_framebuf.c)
zephyr_sources_ifdef(CONFIG_ILI9340 display_ili9340.c) zephyr_sources_ifdef(CONFIG_ILI9340 display_ili9340.c)
zephyr_sources_ifdef(CONFIG_ST7789V display_st7789v.c)


zephyr_sources_ifdef(CONFIG_MICROBIT_DISPLAY zephyr_sources_ifdef(CONFIG_MICROBIT_DISPLAY
mb_display.c mb_display.c
Expand All @@ -20,3 +21,7 @@ zephyr_sources_ifdef(CONFIG_ILI9340_LCD_ADAFRUIT_1480
zephyr_sources_ifdef(CONFIG_ILI9340_LCD_SEEED_TFTV2 zephyr_sources_ifdef(CONFIG_ILI9340_LCD_SEEED_TFTV2
display_ili9340_seeed_tftv2.c display_ili9340_seeed_tftv2.c
) )

zephyr_sources_ifdef(CONFIG_ST7789V_LCD_TL019FQV01
display_st7789v_tl019fqv01.c
)
1 change: 1 addition & 0 deletions drivers/display/Kconfig
Expand Up @@ -24,6 +24,7 @@ source "drivers/display/Kconfig.ili9340"
source "drivers/display/Kconfig.sdl" source "drivers/display/Kconfig.sdl"
source "drivers/display/Kconfig.ssd1306" source "drivers/display/Kconfig.ssd1306"
source "drivers/display/Kconfig.ssd16xx" source "drivers/display/Kconfig.ssd16xx"
source "drivers/display/Kconfig.st7789v"
source "drivers/display/Kconfig.dummy" source "drivers/display/Kconfig.dummy"


config FRAMEBUF_DISPLAY config FRAMEBUF_DISPLAY
Expand Down
68 changes: 68 additions & 0 deletions drivers/display/Kconfig.st7789v
@@ -0,0 +1,68 @@
# Kconfig - ST7789V display driver configuration options

#
# Copyright (c) 2019 Marc Reilly <marc@cpdesign.com.au>
#
# SPDX-License-Identifier: Apache-2.0
#

menuconfig ST7789V
bool "ST7789V display driver"
depends on SPI
help
Enable driver for ST7789V display driver.

if ST7789V

choice
prompt "LCD"
help
Specify the type of LCD connected to the ST7789V display controller.

config ST7789V_LCD_TL019FQV01
bool "TDO TL019FQV01"

endchoice

choice
prompt "Color pixel format"
default ST7789V_RGB565
help
Specify the color pixel format for the ST7789V display controller.

config ST7789V_RGB888
bool "RGB888"

config ST7789V_RGB565
bool "RGB565"

endchoice

if ST7789V_RGB565
config ST7789V_SWAP_PIXEL_LCD_ENDIANNESS
bool "Swap pixel endianness at LCD"
help
Pixel data bytes are swapped when being blitted to the LCD.
Note that this isn't just a swap of RGB <--> BGR, (if the endianness is
swapped then the 3 lowest bits of G are sent first/last).
You may want to enable this if you are using lvgl and your colors
don't look right.

config ST7789V_REVERSE_LCD_RGB_ORDER
bool "Reverse draw order of controller ram to LCD"
help
This reverses the order that the controller draws RGB to the LCD.

config ST7789V_REVERSE_X
bool "Reverse X axis"
help
Address pixels from right to left.

config ST7789V_REVERSE_Y
bool "Reverse Y axis"
help
Address pixels from bottom to top.

endif #ST7789V_RGB565

endif #ST7789V

0 comments on commit b0203ac

Please sign in to comment.