Skip to content

Commit 6a7765c

Browse files
soburikartben
authored andcommitted
shields: display: Add Waveshare Pico LCD 1.14
Added Waveshare 1.14inch LCD module for RaspberryPi Pico. Signed-off-by: TOKITA Hiroshi <[email protected]>
1 parent ecceec9 commit 6a7765c

11 files changed

+295
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Copyright (c) 2025 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SHIELD_WAVESHARE_PICO_LCD_1_14 || SHIELD_WAVESHARE_PICO_LCD_1_14_DISPLAY
5+
6+
if DISPLAY
7+
8+
choice ST7789V_PIXEL_FORMAT
9+
default ST7789V_RGB565
10+
endchoice
11+
12+
if LVGL
13+
14+
config LV_DPI_DEF
15+
default 242
16+
17+
config LV_Z_BITS_PER_PIXEL
18+
default 16
19+
20+
choice LV_COLOR_DEPTH
21+
default LV_COLOR_DEPTH_16
22+
endchoice
23+
24+
configdefault LV_COLOR_16_SWAP
25+
default y
26+
27+
endif # LVGL
28+
29+
endif # DISPLAY
30+
31+
endif # SHIELD_WAVESHARE_PICO_LCD_1_14
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Copyright (c) 2025 TOKITA Hiroshi
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_WAVESHARE_PICO_LCD_1_14
5+
def_bool $(shields_list_contains,waveshare_pico_lcd_1_14)
6+
7+
config SHIELD_WAVESHARE_PICO_LCD_1_14_DISPLAY
8+
def_bool $(shields_list_contains,waveshare_pico_lcd_1_14_display)
9+
10+
config SHIELD_WAVESHARE_PICO_LCD_1_14_BUTTONS
11+
def_bool $(shields_list_contains,waveshare_pico_lcd_1_14_buttons)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* pico_plus2 can use with the rpi_pico configuration. */
8+
#include "rpi_pico.overlay"
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
spi1_default: spi1_default {
9+
group1 {
10+
pinmux = <SPI1_CSN_P9>, <SPI1_SCK_P10>, <SPI1_TX_P11>;
11+
};
12+
};
13+
};
14+
15+
&spi1 {
16+
pinctrl-0 = < &spi1_default >;
17+
pinctrl-names = "default";
18+
cs-gpios = <&pico_header 9 GPIO_ACTIVE_LOW>;
19+
status = "okay";
20+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* rpi_pico2 can use with the rpi_pico configuration. */
8+
#include "rpi_pico.overlay"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* w5500_evb_pico2 can use with the rpi_pico configuration. */
8+
#include "rpi_pico.overlay"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* w5500_evb_pico2 can use with the rpi_pico configuration. */
8+
#include "rpi_pico.overlay"
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.. _waveshare_pico_lcd_1_14:
2+
3+
Waveshare 1.14inch LCD Display Module for Raspberry Pi Pico
4+
###########################################################
5+
6+
Overview
7+
********
8+
9+
The Waveshare 1.14inch LCD Display Module for Raspberry Pi Pico is
10+
a 240x135/65K color IPS LCD module based on the ST7789V controller.
11+
This module connects via SPI.
12+
This display module has two buttons and joystick that the user program can use.
13+
It is convenient for implementing user interfaces.
14+
15+
More information about the shield and Arduino adapter can be found at
16+
the `Waveshare Pico-LCD-1.14 Module website`_.
17+
18+
Pin Assignments
19+
===============
20+
21+
+-------+-----------+-------------------------------------------+
22+
| Name | Function | Usage |
23+
+=======+===========+===========================================+
24+
| GP2 | UP | Joystick Up |
25+
+-------+-----------+-------------------------------------------+
26+
| GP3 | CTRL | Joystick Center |
27+
+-------+-----------+-------------------------------------------+
28+
| GP8 | LCD_DC | Data/Command control pin |
29+
+-------+-----------+-------------------------------------------+
30+
| GP9 | LCD_CS | SPI Chip Select (SPI1_CSN) |
31+
+-------+-----------+-------------------------------------------+
32+
| GP10 | LCD_CLK | SPI Clock input (SPI1_SCK) |
33+
+-------+-----------+-------------------------------------------+
34+
| GP11 | LCD_DIN | SPI Data input (SPI1_TX) |
35+
+-------+-----------+-------------------------------------------+
36+
| GP12 | LCD_RST | Reset |
37+
+-------+-----------+-------------------------------------------+
38+
| GP13 | LCD_BL | Backlight |
39+
+-------+-----------+-------------------------------------------+
40+
| GP15 | GPIO | User Key A |
41+
+-------+-----------+-------------------------------------------+
42+
| GP17 | GPIO | User Key 1 |
43+
+-------+-----------+-------------------------------------------+
44+
| GP18 | DOWN | Joystick Down |
45+
+-------+-----------+-------------------------------------------+
46+
| GP20 | RIGHT | Joystick Right |
47+
+-------+-----------+-------------------------------------------+
48+
49+
Programming
50+
***********
51+
52+
Set ``-DSHIELD=waveshare_pico_lcd_1_14`` when you invoke ``west build``. For example:
53+
54+
.. zephyr-app-commands::
55+
:zephyr-app: samples/subsys/display/lvgl
56+
:board: rpi_pico
57+
:shield: waveshare_pico_oled_1_14
58+
:goals: build
59+
60+
References
61+
**********
62+
63+
.. target-notes::
64+
65+
.. _Waveshare Pico-LCD-1.14 Module website:
66+
https://www.waveshare.com/wiki/Pico-LCD-1.14
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "waveshare_pico_lcd_1_14_display.overlay"
8+
#include "waveshare_pico_lcd_1_14_buttons.overlay"
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
/*
2+
* Copyright (c) 2025 TOKITA Hiroshi
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/gpio/gpio.h>
8+
#include <zephyr/dt-bindings/input/input-event-codes.h>
9+
#include <zephyr/dt-bindings/lvgl/lvgl.h>
10+
11+
/ {
12+
waveshare_pico_lcd_1_14_buttons: waveshare-pico_lcd_1_14-buttons {
13+
compatible = "gpio-keys";
14+
15+
key_a: key_a {
16+
label = "User key A";
17+
gpios = <&pico_header 15 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
18+
zephyr,code = <INPUT_KEY_A>;
19+
};
20+
21+
key_b: key_b {
22+
label = "User key B";
23+
gpios = <&pico_header 17 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
24+
zephyr,code = <INPUT_KEY_B>;
25+
};
26+
};
27+
28+
waveshare_pico_lcd_1_14_joystick: waveshare-pico_lcd_1_14-joystick {
29+
compatible = "gpio-keys";
30+
31+
joystick_enter: joystick_enter {
32+
label = "User joystick ENTER";
33+
gpios = <&pico_header 3 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
34+
zephyr,code = <INPUT_KEY_ENTER>;
35+
};
36+
37+
joystick_right: joystick_right {
38+
label = "User joystick RIGHT";
39+
gpios = <&pico_header 20 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
40+
zephyr,code = <INPUT_KEY_RIGHT>;
41+
};
42+
43+
joystick_up: joystick_up {
44+
label = "User joystick UP";
45+
gpios = <&pico_header 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
46+
zephyr,code = <INPUT_KEY_UP>;
47+
};
48+
49+
joystick_down: joystick_down {
50+
label = "User joystick DOWN";
51+
gpios = <&pico_header 18 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
52+
zephyr,code = <INPUT_KEY_DOWN>;
53+
};
54+
55+
joystick_left: joystick_left {
56+
label = "User joystick LEFT";
57+
gpios = <&pico_header 16 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
58+
zephyr,code = <INPUT_KEY_LEFT>;
59+
};
60+
};
61+
62+
aliases {
63+
sw0 = &key_a;
64+
sw1 = &key_b;
65+
};
66+
};

0 commit comments

Comments
 (0)