Skip to content

Commit

Permalink
board/arm/rp2040: support config st7789 reset gpio pin
Browse files Browse the repository at this point in the history
Signed-off-by: Zhu Zhongjie <[email protected]>
  • Loading branch information
ZhuZhongjie committed Feb 19, 2025
1 parent c9a8f96 commit 31d9569
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions boards/arm/rp2040/common/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -552,6 +552,12 @@ config RP2040_LCD_SPI_CH
range 0 1
---help---
Select SPI channel number to use LCD display.
config LCD_ST7789_RST_GPIO
int "ST7789 LCD Reset gpio number"
default 12
range 0 21
---help---
Select Sitronix ST7789 TFT Controller Reset gpio.

endif # LCD

Expand Down
3 changes: 2 additions & 1 deletion boards/arm/rp2040/common/src/rp2040_st7789.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@

#if LCD_SPI_PORTNO
#define LCD_DC CONFIG_RP2040_SPI1_RX_GPIO
#define LCD_RST 12
#define LCD_RST CONFIG_LCD_ST7789_RST_GPIO
#define LCD_BL 13
#else
#define LCD_DC CONFIG_RP2040_SPI0_RX_GPIO
Expand Down Expand Up @@ -96,6 +96,7 @@ int board_lcd_initialize(void)

rp2040_gpio_init(LCD_RST);
rp2040_gpio_setdir(LCD_RST, true);
rp2040_gpio_put(LCD_RST, false);
rp2040_gpio_put(LCD_RST, true);

/* Set full brightness */
Expand Down

0 comments on commit 31d9569

Please sign in to comment.