Skip to content

Commit 9f0fa15

Browse files
tmilkovic51mbolivar-nordic
authored andcommitted
drivers: display: add stm32_ltdc driver
Add Kconfig for STM32 LTDC driver Add STM32 LTDC driver C source Update display drivers CMakeLists with the new driver Update display drivers Kconfig with the new driver Signed-off-by: Tomislav Milkovic <[email protected]>
1 parent 352a6be commit 9f0fa15

File tree

4 files changed

+489
-0
lines changed

4 files changed

+489
-0
lines changed

drivers/display/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ zephyr_library_sources_ifdef(CONFIG_SSD1306 ssd1306.c)
1616
zephyr_library_sources_ifdef(CONFIG_SSD16XX ssd16xx.c)
1717
zephyr_library_sources_ifdef(CONFIG_ST7789V display_st7789v.c)
1818
zephyr_library_sources_ifdef(CONFIG_ST7735R display_st7735r.c)
19+
zephyr_library_sources_ifdef(CONFIG_STM32_LTDC display_stm32_ltdc.c)
1920

2021
zephyr_library_sources_ifdef(CONFIG_MICROBIT_DISPLAY
2122
mb_display.c

drivers/display/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ source "drivers/display/Kconfig.ssd1306"
2929
source "drivers/display/Kconfig.ssd16xx"
3030
source "drivers/display/Kconfig.st7735r"
3131
source "drivers/display/Kconfig.st7789v"
32+
source "drivers/display/Kconfig.stm32_ltdc"
3233
source "drivers/display/Kconfig.gd7965"
3334
source "drivers/display/Kconfig.dummy"
3435
source "drivers/display/Kconfig.ls0xx"

drivers/display/Kconfig.stm32_ltdc

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# STM32 LTDC display driver configuration options
2+
3+
# Copyright (c) 2022 Byte-Lab d.o.o. <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
DT_COMPAT_STM32_LTDC := st,stm32-ltdc
7+
8+
menuconfig STM32_LTDC
9+
bool "STM32 LCD-TFT display controller driver"
10+
default $(dt_compat_enabled,$(DT_COMPAT_STM32_LTDC))
11+
select USE_STM32_HAL_LTDC
12+
help
13+
Enable driver for STM32 LCT-TFT display controller periheral.
14+
15+
choice STM32_LTDC_PIXEL_FORMAT
16+
prompt "Color pixel format"
17+
default STM32_LTDC_RGB565
18+
depends on STM32_LTDC
19+
help
20+
Specify the color pixel format for the STM32 LCD-TFT display controller.
21+
22+
config STM32_LTDC_ARGB8888
23+
bool "ARGB8888"
24+
help
25+
One pixel consists of 8-bit alpha, 8-bit red, 8-bit green and 8-bit blue value
26+
(4 bytes per pixel)
27+
28+
config STM32_LTDC_RGB888
29+
bool "RGB888"
30+
help
31+
One pixel consists of 8-bit red, 8-bit green and 8-bit blue value
32+
(3 bytes per pixel)
33+
34+
config STM32_LTDC_RGB565
35+
bool "RGB565"
36+
help
37+
One pixel consists of 5-bit red, 6-bit green and 5-bit blue value
38+
(2 bytes per pixel)
39+
40+
endchoice

0 commit comments

Comments
 (0)