- Add complete board support for Waveshare ESP32-C6-Touch-AMOLED-2.16 with SH8601 display driver - Implement board initialization with AXP2101 PMU rail configuration for LCD and touch power - Add display driver for SH8601 QSPI panel (480×480 resolution) - Add CST9217 touch controller support via I2C - Add QMI8658 IMU initialization and sensor reading - Add AXP2101 power management and battery monitoring - Add input handling for BOOT button (GPIO 9) - Configure PlatformIO environment with C6-specific build flags and 16 MB flash layout - Update capability flags documentation to clarify BOARD_HAS_PSRAM build-flag macro usage - C6 has no external PSRAM; shared code gates on this flag to use internal SRAM and reduce LVGL buffer sizes - Screenshot capture disabled on this board due to internal SRAM constraints
180 lines
5.8 KiB
INI
180 lines
5.8 KiB
INI
[env:waveshare_amoled_216]
|
||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
|
||
board = esp32-s3-devkitc-1
|
||
framework = arduino
|
||
board_build.arduino.memory_type = qio_opi
|
||
upload_speed = 921600
|
||
monitor_speed = 115200
|
||
|
||
; Compile shared code + this board's per-board folder; exclude all other
|
||
; boards. New ports add a `+<boards/<name>/>` line in their own env block.
|
||
build_src_filter =
|
||
+<*>
|
||
-<boards/>
|
||
+<boards/waveshare_amoled_216/>
|
||
|
||
build_flags =
|
||
-DBOARD_AMOLED_216
|
||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||
-DBOARD_HAS_PSRAM
|
||
; AXP2101 PMU
|
||
-DXPOWERS_CHIP_AXP2101
|
||
; NimBLE config — peripheral, 2 simultaneous connections so the OS can
|
||
; hold the HID link (Space key from BOOT button) while the daemon holds
|
||
; its own connection for the custom data service.
|
||
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
|
||
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
|
||
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
|
||
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
|
||
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=2
|
||
; LVGL config via build flags
|
||
-DLV_CONF_SKIP
|
||
-DLV_COLOR_DEPTH=16
|
||
-DLV_USE_LOG=0
|
||
-DLV_USE_BAR=1
|
||
-DLV_USE_LABEL=1
|
||
-DLV_USE_ARC=1
|
||
-DLV_USE_BTN=1
|
||
-DLV_USE_LINE=1
|
||
-DLV_USE_OBJ=1
|
||
-DLV_USE_IMG=1
|
||
-DLV_USE_IMAGE=1
|
||
-DLV_USE_ANIMIMG=0
|
||
-DLV_TICK_CUSTOM=1
|
||
-DLV_USE_SNAPSHOT=1
|
||
|
||
lib_deps =
|
||
moononournation/GFX Library for Arduino@^1.5.6
|
||
lewisxhe/SensorLib@^0.2.6
|
||
lewisxhe/XPowersLib@^0.2.7
|
||
lvgl/lvgl@^9.2.0
|
||
bblanchon/ArduinoJson@^7.0.0
|
||
h2zero/NimBLE-Arduino@^2.1.1
|
||
|
||
|
||
[env:waveshare_amoled_18]
|
||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
|
||
board = esp32-s3-devkitc-1
|
||
framework = arduino
|
||
board_build.arduino.memory_type = qio_opi
|
||
board_upload.flash_size = 16MB
|
||
board_upload.maximum_size = 16777216
|
||
board_build.partitions = default_16MB.csv
|
||
upload_speed = 921600
|
||
monitor_speed = 115200
|
||
|
||
; Compile shared code + this board's per-board folder; exclude all other
|
||
; boards. New ports add a `+<boards/<name>/>` line in their own env block.
|
||
build_src_filter =
|
||
+<*>
|
||
-<boards/>
|
||
+<boards/waveshare_amoled_18/>
|
||
|
||
build_flags =
|
||
-DBOARD_AMOLED_18
|
||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||
-DBOARD_HAS_PSRAM
|
||
; AXP2101 PMU is present on the AMOLED-1.8 board too (battery is optional kit add-on)
|
||
-DXPOWERS_CHIP_AXP2101
|
||
; NimBLE config — peripheral, 2 simultaneous connections so the OS can
|
||
; hold the HID link (Space key from BOOT button) while the daemon holds
|
||
; its own connection for the custom data service.
|
||
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
|
||
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
|
||
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
|
||
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
|
||
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=2
|
||
; LVGL config via build flags
|
||
-DLV_CONF_SKIP
|
||
-DLV_COLOR_DEPTH=16
|
||
-DLV_USE_LOG=0
|
||
-DLV_USE_BAR=1
|
||
-DLV_USE_LABEL=1
|
||
-DLV_USE_ARC=1
|
||
-DLV_USE_BTN=1
|
||
-DLV_USE_LINE=1
|
||
-DLV_USE_OBJ=1
|
||
-DLV_USE_IMG=1
|
||
-DLV_USE_IMAGE=1
|
||
-DLV_USE_ANIMIMG=0
|
||
-DLV_TICK_CUSTOM=1
|
||
-DLV_USE_SNAPSHOT=1
|
||
|
||
lib_deps =
|
||
; 1.6.4+ ships Arduino_SH8601 in mainline
|
||
moononournation/GFX Library for Arduino@^1.6.4
|
||
; SensorLib still used for QMI8658 IMU on AMOLED-1.8
|
||
lewisxhe/SensorLib@^0.2.6
|
||
lewisxhe/XPowersLib@^0.2.7
|
||
lvgl/lvgl@^9.2.0
|
||
bblanchon/ArduinoJson@^7.0.0
|
||
h2zero/NimBLE-Arduino@^2.1.1
|
||
|
||
|
||
[env:waveshare_amoled_216_c6]
|
||
; C6 sibling of the AMOLED-2.16. Same panel/touch/PMU/IMU, no PSRAM,
|
||
; single-core RISC-V, BLE 5.3 only (no classic BT). If the build fails
|
||
; resolving the C6 board, bump pioarduino to a newer 55.x release that
|
||
; ships esp32-c6-devkitc-1.
|
||
platform = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.38-1/platform-espressif32.zip
|
||
board = esp32-c6-devkitc-1
|
||
framework = arduino
|
||
upload_speed = 921600
|
||
monitor_speed = 115200
|
||
; Waveshare's C6-AMOLED-2.16 ships with 16 MB flash. The default 1.25 MB
|
||
; app partition can't hold this firmware (~1.43 MB) — switch to the
|
||
; 16 MB layout that gives the app ~6.5 MB, matching the AMOLED-1.8 env.
|
||
board_upload.flash_size = 16MB
|
||
board_upload.maximum_size = 16777216
|
||
board_build.partitions = default_16MB.csv
|
||
|
||
build_src_filter =
|
||
+<*>
|
||
-<boards/>
|
||
+<boards/waveshare_amoled_216_c6/>
|
||
|
||
build_flags =
|
||
-DBOARD_AMOLED_216_C6
|
||
; C6 has only USB-Serial-JTAG (HWCDC), no native USB-OTG. The Arduino
|
||
; core maps Serial → HWCDCSerial only when BOTH flags below are set;
|
||
; CDC_ON_BOOT alone selects USBSerial (TinyUSB) which doesn't exist on
|
||
; C6 and breaks the build. Without either flag, Serial routes to UART0
|
||
; on physical pins and nothing reaches the USB host.
|
||
-DARDUINO_USB_CDC_ON_BOOT=1
|
||
-DARDUINO_USB_MODE=1
|
||
; No -DBOARD_HAS_PSRAM — C6 has no external PSRAM. Shared code
|
||
; (main.cpp, splash.cpp) gates on this to pick MALLOC_CAP_INTERNAL
|
||
; and shrink LVGL buffers + splash canvas accordingly.
|
||
-DXPOWERS_CHIP_AXP2101
|
||
-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER=1
|
||
-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL=1
|
||
-DCONFIG_BT_NIMBLE_ROLE_CENTRAL=0
|
||
-DCONFIG_BT_NIMBLE_ROLE_OBSERVER=0
|
||
-DCONFIG_BT_NIMBLE_MAX_CONNECTIONS=2
|
||
-DLV_CONF_SKIP
|
||
-DLV_COLOR_DEPTH=16
|
||
-DLV_USE_LOG=0
|
||
-DLV_USE_BAR=1
|
||
-DLV_USE_LABEL=1
|
||
-DLV_USE_ARC=1
|
||
-DLV_USE_BTN=1
|
||
-DLV_USE_LINE=1
|
||
-DLV_USE_OBJ=1
|
||
-DLV_USE_IMG=1
|
||
-DLV_USE_IMAGE=1
|
||
-DLV_USE_ANIMIMG=0
|
||
-DLV_TICK_CUSTOM=1
|
||
; Screenshot capture needs a full-frame RGB565 buffer (~460 KB on
|
||
; 480×480) which doesn't fit in C6 internal SRAM. send_screenshot
|
||
; prints SCREENSHOT_UNSUPPORTED on this board.
|
||
-DLV_USE_SNAPSHOT=0
|
||
|
||
lib_deps =
|
||
; 1.6.4+ required for Arduino_SH8601 (this board uses SH8601, not CO5300)
|
||
moononournation/GFX Library for Arduino@^1.6.4
|
||
lewisxhe/SensorLib@^0.2.6
|
||
lewisxhe/XPowersLib@^0.2.7
|
||
lvgl/lvgl@^9.2.0
|
||
bblanchon/ArduinoJson@^7.0.0
|
||
h2zero/NimBLE-Arduino@^2.1.1
|