-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Added generic shield for ST7789V display controller #20570
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nashif
merged 11 commits into
zephyrproject-rtos:master
from
vanwinkeljan:st7789v_shield
Jan 2, 2020
Merged
Changes from 2 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
b103494
shields: display: Added generic shield for ST7789V
vanwinkeljan 9b485a4
samples: display: Use ST7789V generic shield
vanwinkeljan f15d60b
drivers: display_st7789v: fix style, move init function to the bottom
jfischer-no 43ff895
drivers: display_st7789v: obtain resolution and offsets from DT
jfischer-no 0fe85fe
drivers: display_st7789v: make functions static, cleanup
jfischer-no ada1b6f
drivers: display_st7789v: obtain panel settings and parameters from DT
jfischer-no 5eac3ca
drivers: display_st7789v: remove obsolete Kconfig options
jfischer-no c1b81a0
drivers: display_st7789v: remove obsolete display_st7789v_tl019fqv01.c
jfischer-no 86ae0bd
shields: st7789v_generic: add TL019FQV01 parameter and settings prope…
jfischer-no 20b3314
shields: st7789v_generic: rename shield to TL019FQV01
jfischer-no b327141
shields: st7789v_generic: add support for Waveshare 1.3inch display
jfischer-no File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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>; | ||
| }; | ||
| }; |
This file contains hidden or 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
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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 |
|---|---|---|
| @@ -1,15 +1,4 @@ | ||
| CONFIG_PRINTK=y | ||
|
|
||
| CONFIG_HEAP_MEM_POOL_SIZE=16384 | ||
|
|
||
| CONFIG_GPIO=y | ||
| CONFIG_SPI=y | ||
|
|
||
| CONFIG_DISPLAY=y | ||
| CONFIG_ST7789V=y | ||
| CONFIG_ST7789V_LCD_TL019FQV01=y | ||
| CONFIG_ST7789V_RGB565=y | ||
|
|
||
| CONFIG_DISPLAY_LOG_LEVEL_DBG=y | ||
|
|
||
| CONFIG_LOG=y | ||
| CONFIG_DISPLAY_LOG_LEVEL_DBG=y |
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this a stray change? it doesn't seem related to the commit message
samples: display: Use ST7789V generic shieldThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like it, but it is a bug fix for the sample in case RGB565 is not defined
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not nice but this sample (and any other controller type specific) should be removed after we merged #20580