Skip to content

Commit

Permalink
boards/esp32s2-lilygo-ttgo-t8: fix display config
Browse files Browse the repository at this point in the history
  • Loading branch information
gschorcht committed Jul 7, 2023
1 parent f57b6b7 commit 1a92c49
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 12 deletions.
2 changes: 1 addition & 1 deletion boards/esp32s2-lilygo-ttgo-t8/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ config BOARD_ESP32S2_LILYGO_TTGO_T8
select HAS_SDCARD_SPI
select HAS_TINYUSB_DEVICE
select HAVE_MTD_SDCARD_DEFAULT
select HAVE_ST7735
select HAVE_ST7789
select MODULE_FATFS_VFS if MODULE_VFS_DEFAULT

config FORCE_USB_STDIO
Expand Down
7 changes: 6 additions & 1 deletion boards/esp32s2-lilygo-ttgo-t8/Makefile.dep
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@ ifneq (,$(filter vfs_default,$(USEMODULE)))
endif

ifneq (,$(filter disp_dev,$(USEMODULE)))
USEMODULE += st7735
USEMODULE += st7789
endif

ifneq (,$(filter st7735,$(USEMODULE)))
# use st7789 pseudomodule if st7735 is enabled to indicate that we use a ST7789
USEMODULE += st7789
endif

include $(RIOTBOARD)/common/esp32s2/Makefile.dep
7 changes: 3 additions & 4 deletions boards/esp32s2-lilygo-ttgo-t8/doc.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@

## Overview {#esp32s2_lilygo_ttgo_t8_overview}

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

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

Expand All @@ -39,7 +39,7 @@ ESP32-S2 SoC | yes
8 MB QSPI RAM | yes
SD Card slot | yes
32.768KHz Crystal | yes
OLED display ST77789 | no
OLED display ST77789 | yes

[Back to table of contents](#esp32s2_lilygo_ttgo_t8_toc)

Expand All @@ -49,7 +49,6 @@ This section describes

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

[Back to table of contents](#esp32s2_lilygo_ttgo_t8_toc)
Expand Down
13 changes: 8 additions & 5 deletions boards/esp32s2-lilygo-ttgo-t8/include/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,19 @@
* @{
*/
#if defined(MODULE_ST7735)
#define ST7735_PARAM_SPI SPI_DEV(1) /**< SPI device */
#define ST7735_PARAM_SPI_CLK SPI_CLK_5MHZ /**< SPI clock frequency */
#define ST7735_PARAM_SPI SPI_DEV(0) /**< SPI device */
#define ST7735_PARAM_SPI_CLK SPI_CLK_10MHZ /**< SPI clock frequency */
#define ST7735_PARAM_SPI_MODE SPI_MODE_0 /**< SPI mode */
#define ST7735_PARAM_CS GPIO34 /**< Chip Select pin */
#define ST7735_PARAM_DCX GPIO37 /**< DCX pin */
#define ST7735_PARAM_RST GPIO38 /**< Reset pin */
#define ST7735_PARAM_RGB 1 /**< RGB mode enable */
#define ST7735_PARAM_INVERTED 0 /**< Inverted mode enable */
#define ST7735_PARAM_NUM_LINES 135U /**< Number of lines */
#define ST7735_PARAM_RGB_CHANNELS 240U /**< Number of columns */
#define ST7735_PARAM_INVERTED 1 /**< Inverted mode enable */
#define ST7735_PARAM_NUM_LINES 240U /**< Number of lines */
#define ST7735_PARAM_RGB_CHANNELS 135U /**< Number of columns */
#define ST7735_PARAM_ROTATION LCD_MADCTL_MY /**< Rotation */
#define ST7735_PARAM_OFFSET_X 40 /**< X offset */
#define ST7735_PARAM_OFFSET_Y 52 /**< Y offset */
#endif
/** @} */

Expand Down
2 changes: 1 addition & 1 deletion boards/esp32s2-lilygo-ttgo-t8/include/periph_conf.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ extern "C" {
#define SPI0_SCK GPIO36 /**< FSPICLK used as signal `OLED_CLK` */
#endif
#ifndef SPI0_MISO
#define SPI0_MISO GPIO37 /**< FSPIQ used as Display signal `OLED_MISO` */
#define SPI0_MISO GPIO9 /**< FSPIHD dummy (not broken out), GPIO37 is used as DCX */
#endif
#ifndef SPI0_MOSI
#define SPI0_MOSI GPIO35 /**< FSPID used as Display signal `OLED_MOSI` */
Expand Down

0 comments on commit 1a92c49

Please sign in to comment.