forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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]>
- Loading branch information
1 parent
cad30e8
commit 7a633a5
Showing
3 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
.. _st7789v_generic: | ||
|
||
Generic ST7789V Display Shield | ||
############################## | ||
|
||
Overview | ||
******** | ||
|
||
This is a generic shield for display shields based on ST7789V display | ||
controller. More information about the controller can be found in | ||
`ST7789V Datasheet`_. | ||
|
||
Pins Assignment of the Generic ST7789V Display Shield | ||
===================================================== | ||
|
||
+-----------------------+--------------------------------------------+ | ||
| Arduino Connector Pin | Function | | ||
+=======================+===============+============================+ | ||
| D8 | ST7789V Reset | | | ||
+-----------------------+---------------+----------------------------+ | ||
| D9 | ST7789V DC | (Data/Command) | | ||
+-----------------------+---------------+----------------------------+ | ||
| D10 | SPI SS | (Serial Slave Select) | | ||
+-----------------------+---------------+----------------------------+ | ||
| D11 | SPI MOSI | (Serial Data Input) | | ||
+-----------------------+---------------+----------------------------+ | ||
| D12 | SPI MISO | (Serial Data Out) | | ||
+-----------------------+---------------+----------------------------+ | ||
| D13 | SPI SCK | (Serial Clock Input) | | ||
+-----------------------+---------------+----------------------------+ | ||
|
||
Requirements | ||
************ | ||
|
||
This shield can only be used with a board that provides a configuration | ||
for Arduino connectors and defines node aliases for SPI and GPIO interfaces | ||
(see :ref:`shields` for more details). | ||
|
||
Programming | ||
*********** | ||
|
||
Set ``-DSHIELD=st7789v_generic`` when you invoke ``west build``. For example: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/gui/lvgl | ||
:board: nrf52840_pca10056 | ||
:shield: st7789v_generic | ||
:goals: build | ||
|
||
References | ||
********** | ||
|
||
.. target-notes:: | ||
|
||
.. _ST7789V Datasheet: | ||
https://www.newhavendisplay.com/appnotes/datasheets/LCDs/ST7789V.pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
CONFIG_SPI=y | ||
CONFIG_DISPLAY=y | ||
CONFIG_ST7789V=y | ||
|
||
CONFIG_ST7789V_RGB888=y | ||
CONFIG_LVGL_BITS_PER_PIXEL=24 | ||
CONFIG_LVGL_HOR_RES=320 | ||
CONFIG_LVGL_VER_RES=170 | ||
|
||
CONFIG_LVGL_DISPLAY_DEV_NAME="ST7789V" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* | ||
* Copyright (c) 2019 Jan Van Winkel <[email protected]> | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
&arduino_spi { | ||
status = "okay"; | ||
cs-gpios = <&arduino_header 16 0>; /* D10 */ | ||
|
||
st7789v@0 { | ||
compatible = "sitronix,st7789v"; | ||
label = "ST7789V"; | ||
spi-max-frequency = <20000000>; | ||
reg = <0>; | ||
cmd-data-gpios = <&arduino_header 15 0>; /* D9 */ | ||
reset-gpios = <&arduino_header 14 0>; /* D8 */ | ||
width = <320>; | ||
height = <170>; | ||
y-offset = <35>; | ||
}; | ||
}; |