Skip to content

Commit 1a92c49

Browse files
committed
boards/esp32s2-lilygo-ttgo-t8: fix display config
1 parent f57b6b7 commit 1a92c49

5 files changed

Lines changed: 19 additions & 12 deletions

File tree

boards/esp32s2-lilygo-ttgo-t8/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ config BOARD_ESP32S2_LILYGO_TTGO_T8
2626
select HAS_SDCARD_SPI
2727
select HAS_TINYUSB_DEVICE
2828
select HAVE_MTD_SDCARD_DEFAULT
29-
select HAVE_ST7735
29+
select HAVE_ST7789
3030
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT
3131

3232
config FORCE_USB_STDIO

boards/esp32s2-lilygo-ttgo-t8/Makefile.dep

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ ifneq (,$(filter vfs_default,$(USEMODULE)))
1313
endif
1414

1515
ifneq (,$(filter disp_dev,$(USEMODULE)))
16-
USEMODULE += st7735
16+
USEMODULE += st7789
17+
endif
18+
19+
ifneq (,$(filter st7735,$(USEMODULE)))
20+
# use st7789 pseudomodule if st7735 is enabled to indicate that we use a ST7789
21+
USEMODULE += st7789
1722
endif
1823

1924
include $(RIOTBOARD)/common/esp32s2/Makefile.dep

boards/esp32s2-lilygo-ttgo-t8/doc.txt

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525

2626
## Overview {#esp32s2_lilygo_ttgo_t8_overview}
2727

28-
The Espressif LILYGO TTGO T8 ESP32-S2 is a ESP32-S2 board with an OLED Display
29-
(not yet supported) and a TF Card slot.
28+
The Espressif LILYGO TTGO T8 ESP32-S2 (also known as LilyGo T-Display S2) is
29+
a ESP32-S2 board with an OLED Display and a TF Card slot.
3030

3131
\image html https://ae01.alicdn.com/kf/H8062f551fe7b4233809294d4a5b1d45d1.jpg "LILYGO TTGO T8 ESP32-S2" width=600px
3232

@@ -39,7 +39,7 @@ ESP32-S2 SoC | yes
3939
8 MB QSPI RAM | yes
4040
SD Card slot | yes
4141
32.768KHz Crystal | yes
42-
OLED display ST77789 | no
42+
OLED display ST77789 | yes
4343

4444
[Back to table of contents](#esp32s2_lilygo_ttgo_t8_toc)
4545

@@ -49,7 +49,6 @@ This section describes
4949

5050
- the [MCU](#esp32s2_lilygo_ttgo_t8_mcu),
5151
- the default [board configuration](#esp32s2_lilygo_ttgo_t8_board_configuration),
52-
- [optional hardware configurations](#esp32s2_lilygo_ttgo_t8_optional_hardware),
5352
- the [board pinout](#esp32s2_lilygo_ttgo_t8_pinout).
5453

5554
[Back to table of contents](#esp32s2_lilygo_ttgo_t8_toc)

boards/esp32s2-lilygo-ttgo-t8/include/board.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,19 @@
8888
* @{
8989
*/
9090
#if defined(MODULE_ST7735)
91-
#define ST7735_PARAM_SPI SPI_DEV(1) /**< SPI device */
92-
#define ST7735_PARAM_SPI_CLK SPI_CLK_5MHZ /**< SPI clock frequency */
91+
#define ST7735_PARAM_SPI SPI_DEV(0) /**< SPI device */
92+
#define ST7735_PARAM_SPI_CLK SPI_CLK_10MHZ /**< SPI clock frequency */
9393
#define ST7735_PARAM_SPI_MODE SPI_MODE_0 /**< SPI mode */
9494
#define ST7735_PARAM_CS GPIO34 /**< Chip Select pin */
9595
#define ST7735_PARAM_DCX GPIO37 /**< DCX pin */
9696
#define ST7735_PARAM_RST GPIO38 /**< Reset pin */
9797
#define ST7735_PARAM_RGB 1 /**< RGB mode enable */
98-
#define ST7735_PARAM_INVERTED 0 /**< Inverted mode enable */
99-
#define ST7735_PARAM_NUM_LINES 135U /**< Number of lines */
100-
#define ST7735_PARAM_RGB_CHANNELS 240U /**< Number of columns */
98+
#define ST7735_PARAM_INVERTED 1 /**< Inverted mode enable */
99+
#define ST7735_PARAM_NUM_LINES 240U /**< Number of lines */
100+
#define ST7735_PARAM_RGB_CHANNELS 135U /**< Number of columns */
101+
#define ST7735_PARAM_ROTATION LCD_MADCTL_MY /**< Rotation */
102+
#define ST7735_PARAM_OFFSET_X 40 /**< X offset */
103+
#define ST7735_PARAM_OFFSET_Y 52 /**< Y offset */
101104
#endif
102105
/** @} */
103106

boards/esp32s2-lilygo-ttgo-t8/include/periph_conf.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ extern "C" {
147147
#define SPI0_SCK GPIO36 /**< FSPICLK used as signal `OLED_CLK` */
148148
#endif
149149
#ifndef SPI0_MISO
150-
#define SPI0_MISO GPIO37 /**< FSPIQ used as Display signal `OLED_MISO` */
150+
#define SPI0_MISO GPIO9 /**< FSPIHD dummy (not broken out), GPIO37 is used as DCX */
151151
#endif
152152
#ifndef SPI0_MOSI
153153
#define SPI0_MOSI GPIO35 /**< FSPID used as Display signal `OLED_MOSI` */

0 commit comments

Comments
 (0)