Skip to content

Commit b72ae8e

Browse files
committed
shields: display: Added generic shield for ST7789V
Added a generic display shield for boards based on the ST7789V display controller. Signed-off-by: Jan Van Winkel <[email protected]>
1 parent 0443c6d commit b72ae8e

File tree

3 files changed

+89
-0
lines changed

3 files changed

+89
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
.. _st7789v_generic:
2+
3+
Generic ST7789V Display Shield
4+
##############################
5+
6+
Overview
7+
********
8+
9+
This is a generic shield for display shields based on ST7789V display
10+
controller. More information about the controller can be found in
11+
`ST7789V Datasheet`_.
12+
13+
Pins Assignment of the Generic ST7789V Display Shield
14+
=====================================================
15+
16+
+-----------------------+---------------------------------------------+
17+
| Arduino Connector Pin | Function |
18+
+=======================+=============================================+
19+
| D8 | ST7789V Reset |
20+
+-----------------------+---------------------------------------------+
21+
| D9 | ST7789V DC (Data/Command) |
22+
+-----------------------+---------------------------------------------+
23+
| D10 | SPI SS (Serial Slave Select) |
24+
+-----------------------+---------------------------------------------+
25+
| D11 | SPI MOSI (Serial Data Input) |
26+
+-----------------------+---------------------------------------------+
27+
| D12 | SPI MISO (Serial Data Out) |
28+
+-----------------------+---------------------------------------------+
29+
| D13 | SPI SCK (Serial Clock Input) |
30+
+-----------------------+---------------------------------------------+
31+
32+
Requirements
33+
************
34+
35+
This shield can only be used with a board that provides a configuration
36+
for Arduino connectors and defines node aliases for SPI and GPIO interfaces
37+
(see :ref:`shields` for more details).
38+
39+
Programming
40+
***********
41+
42+
Set ``-DSHIELD=st7789v_generic`` when you invoke ``west build``. For example:
43+
44+
.. zephyr-app-commands::
45+
:zephyr-app: samples/gui/lvgl
46+
:board: nrf52840_pca10056
47+
:shield: st7789v_generic
48+
:goals: build
49+
50+
References
51+
**********
52+
53+
.. target-notes::
54+
55+
.. _ST7789V Datasheet:
56+
https://www.newhavendisplay.com/appnotes/datasheets/LCDs/ST7789V.pdf
57+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
CONFIG_SPI=y
2+
CONFIG_DISPLAY=y
3+
CONFIG_ST7789V=y
4+
5+
CONFIG_ST7789V_RGB888=y
6+
CONFIG_LVGL_BITS_PER_PIXEL=24
7+
CONFIG_LVGL_HOR_RES=320
8+
CONFIG_LVGL_VER_RES=170
9+
10+
CONFIG_LVGL_DISPLAY_DEV_NAME="ST7789V"
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2019 Jan Van Winkel <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&arduino_spi {
8+
status = "okay";
9+
cs-gpios = <&arduino_header 16 0>; /* D10 */
10+
11+
st7789v@0 {
12+
compatible = "sitronix,st7789v";
13+
label = "ST7789V";
14+
spi-max-frequency = <20000000>;
15+
reg = <0>;
16+
cmd-data-gpios = <&arduino_header 15 0>; /* D9 */
17+
reset-gpios = <&arduino_header 14 0>; /* D8 */
18+
width = <320>;
19+
height = <170>;
20+
y-offset = <35>;
21+
};
22+
};

0 commit comments

Comments
 (0)