Skip to content

Commit bd5290d

Browse files
committed
samples: display: Use ST7789V generic shield
Use the ST7789V generic shield in ST7789V display sample Signed-off-by: Jan Van Winkel <[email protected]>
1 parent b72ae8e commit bd5290d

File tree

5 files changed

+25
-57
lines changed

5 files changed

+25
-57
lines changed

samples/display/st7789v/README.rst

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,26 @@ controller orientation.
1818

1919
Building and Running
2020
********************
21-
The sample has a board overlay for a nrf52832 based board with the following
22-
pin assignments:
23-
24-
+-------------+-------------+
25-
| | nRF52832 | | LCD module|
26-
| | Pin | | signal |
27-
+=============+=============+
28-
| P0.03 | SPI_SCK |
29-
+-------------+-------------+
30-
| P0.05 | SPI_MOSI |
31-
+-------------+-------------+
32-
| P0.26 | SPI_MISO |
33-
+-------------+-------------+
34-
| P0.27 | CS |
35-
+-------------+-------------+
36-
| P0.25 | DATA/CMD |
37-
+-------------+-------------+
38-
| P0.02 | RESET |
39-
+-------------+-------------+
21+
22+
The sample uses the :ref:`st7789v_generic` and the pin assignments on a
23+
:ref:`nrf52_pca10040` are as follows:
24+
25+
+-------------------+-------------+
26+
| | NRF52 PCA10040 | | LCD module|
27+
| | Pin | | signal |
28+
+===================+=============+
29+
| P1.15 (D13) | SPI_SCK |
30+
+-------------------+-------------+
31+
| P1.14 (D12) | SPI_MISO |
32+
+-------------------+-------------+
33+
| P1.13 (D11) | SPI_MOSI |
34+
+-------------------+-------------+
35+
| P1.12 (D10) | CS |
36+
+-------------------+-------------+
37+
| P1.11 (D9) | DATA/CMD |
38+
+-------------------+-------------+
39+
| P1.10 (D8) | RESET |
40+
+-------------------+-------------+
4041

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

@@ -45,6 +46,7 @@ For :ref:`nrf52_pca10040`, build this sample application with the following comm
4546
.. zephyr-app-commands::
4647
:zephyr-app: samples/display/st7789v
4748
:board: nrf52_pca10040
49+
:shield: st7789v_generic
4850
:goals: build
4951
:compact:
5052

samples/display/st7789v/nrf52_pca10040.overlay

Lines changed: 0 additions & 25 deletions
This file was deleted.

samples/display/st7789v/prj.conf

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
11
CONFIG_PRINTK=y
2-
32
CONFIG_HEAP_MEM_POOL_SIZE=16384
4-
5-
CONFIG_GPIO=y
6-
CONFIG_SPI=y
7-
8-
CONFIG_DISPLAY=y
9-
CONFIG_ST7789V=y
10-
CONFIG_ST7789V_LCD_TL019FQV01=y
11-
CONFIG_ST7789V_RGB565=y
12-
13-
CONFIG_DISPLAY_LOG_LEVEL_DBG=y
14-
153
CONFIG_LOG=y
4+
CONFIG_DISPLAY_LOG_LEVEL_DBG=y

samples/display/st7789v/sample.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ tests:
55
sample.display.st7789v:
66
build_only: true
77
platform_whitelist: nrf52_pca10040
8-
tags: display
8+
extra_args: SHIELD=st7789v_generic
9+
tags: display shield

samples/display/st7789v/src/main.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ void main(void)
121121
*(buf + idx + 1) = (color_rgb >> 0) & 0xFFU;
122122
}
123123
#else
124+
int color = cnt % 4;
124125
u32_t color_rgb;
125126
u32_t c = grey_count & 0xff;
126127

0 commit comments

Comments
 (0)