Skip to content

Commit

Permalink
samples: display: Use ST7789V generic shield
Browse files Browse the repository at this point in the history
Use the ST7789V generic shield in ST7789V display sample

Signed-off-by: Jan Van Winkel <[email protected]>
  • Loading branch information
vanwinkeljan authored and nashif committed Jan 2, 2020
1 parent 7a633a5 commit 3e63d6a
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 57 deletions.
40 changes: 21 additions & 19 deletions samples/display/st7789v/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,26 @@ controller orientation.

Building and Running
********************
The sample has a board overlay for a nrf52832 based board with the following
pin assignments:

+-------------+-------------+
| | nRF52832 | | LCD module|
| | Pin | | signal |
+=============+=============+
| P0.03 | SPI_SCK |
+-------------+-------------+
| P0.05 | SPI_MOSI |
+-------------+-------------+
| P0.26 | SPI_MISO |
+-------------+-------------+
| P0.27 | CS |
+-------------+-------------+
| P0.25 | DATA/CMD |
+-------------+-------------+
| P0.02 | RESET |
+-------------+-------------+

The sample uses the :ref:`st7789v_generic` and the pin assignments on a
:ref:`nrf52_pca10040` are as follows:

+-------------------+-------------+
| | NRF52 PCA10040 | | LCD module|
| | Pin | | signal |
+===================+=============+
| P1.15 (D13) | SPI_SCK |
+-------------------+-------------+
| P1.14 (D12) | SPI_MISO |
+-------------------+-------------+
| P1.13 (D11) | SPI_MOSI |
+-------------------+-------------+
| P1.12 (D10) | CS |
+-------------------+-------------+
| P1.11 (D9) | DATA/CMD |
+-------------------+-------------+
| P1.10 (D8) | RESET |
+-------------------+-------------+

You might need to alter these according to your specific board/LCD configuration.

Expand All @@ -45,6 +46,7 @@ For :ref:`nrf52_pca10040`, build this sample application with the following comm
.. zephyr-app-commands::
:zephyr-app: samples/display/st7789v
:board: nrf52_pca10040
:shield: st7789v_generic
:goals: build
:compact:

Expand Down
25 changes: 0 additions & 25 deletions samples/display/st7789v/nrf52_pca10040.overlay

This file was deleted.

13 changes: 1 addition & 12 deletions samples/display/st7789v/prj.conf
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
3 changes: 2 additions & 1 deletion samples/display/st7789v/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ tests:
sample.display.st7789v:
build_only: true
platform_whitelist: nrf52_pca10040
tags: display
extra_args: SHIELD=st7789v_generic
tags: display shield
1 change: 1 addition & 0 deletions samples/display/st7789v/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ void main(void)
*(buf + idx + 1) = (color_rgb >> 0) & 0xFFU;
}
#else
int color = cnt % 4;
u32_t color_rgb;
u32_t c = grey_count & 0xff;

Expand Down

0 comments on commit 3e63d6a

Please sign in to comment.