esp32/boards: Add support for the Waveshare ESP32-C6-Touch-LCD-1.47. by mattytrentini · Pull Request #19690 · micropython/micropython · GitHub
Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions ports/esp32/boards/WAVESHARE_C6_TOUCH_LCD_1_47/board.json
15 changes: 15 additions & 0 deletions ports/esp32/boards/WAVESHARE_C6_TOUCH_LCD_1_47/board.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
The Waveshare ESP32-C6-Touch-LCD-1.47 uses an ESP32-C6FH8 with 8MiB of flash.
It includes a 172x320 JD9853 SPI LCD, an AXS5106L capacitive touch controller,
a QMI8658A IMU, and a microSD card slot.

The default I2C bus is shared by the touch controller and IMU::

I2C(0, scl=Pin(19), sda=Pin(18))

The default SPI bus is shared by the LCD and microSD card::

SPI(1, sck=Pin(1), mosi=Pin(2), miso=Pin(3))

Use the board pin aliases ``LCD_*``, ``TP_*``, ``IMU_INT*``, and ``SD_*`` for
the onboard peripherals. The LCD and microSD card share SCK and MOSI, so keep
the chip select of the unused peripheral inactive when using either device.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
include(boards/mpconfigboard_esp32c6_common.cmake)

list(APPEND SDKCONFIG_DEFAULTS
boards/sdkconfig.flash_qio_80m
boards/WAVESHARE_C6_TOUCH_LCD_1_47/sdkconfig.board
)
11 changes: 11 additions & 0 deletions ports/esp32/boards/WAVESHARE_C6_TOUCH_LCD_1_47/mpconfigboard.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#define MICROPY_HW_BOARD_NAME "Waveshare ESP32-C6-Touch-LCD-1.47"
#define MICROPY_HW_MCU_NAME "ESP32-C6"

// Onboard touch controller and IMU share this I2C bus.
#define MICROPY_HW_I2C0_SCL (19)
#define MICROPY_HW_I2C0_SDA (18)

// Onboard LCD and microSD card share this SPI bus.
#define MICROPY_HW_SPI1_MOSI (2)
#define MICROPY_HW_SPI1_MISO (3)
#define MICROPY_HW_SPI1_SCK (1)
22 changes: 22 additions & 0 deletions ports/esp32/boards/WAVESHARE_C6_TOUCH_LCD_1_47/pins.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
BAT_ADC,GPIO0
LCD_SCK,GPIO1
SD_SCK,GPIO1
LCD_SDA,GPIO2
SD_MOSI,GPIO2
SD_MISO,GPIO3
SD_CS,GPIO4
IMU_INT1,GPIO5
IMU_INT2,GPIO6
BOOT,GPIO8
LCD_CS,GPIO14
LCD_DC,GPIO15
TX,GPIO16
RX,GPIO17
I2C_SDA,GPIO18
TP_SDA,GPIO18
I2C_SCL,GPIO19
TP_SCL,GPIO19
TP_RST,GPIO20
TP_INT,GPIO21
LCD_RST,GPIO22
LCD_BL,GPIO23
Loading