Skip to content

feat(boards): Add Seeed SenseCap Indicator D1L support#46

Open
carroarmato0 wants to merge 14 commits into
HermannBjorgvin:mainfrom
carroarmato0:feature/sensecap-indicator-d1l-v2
Open

feat(boards): Add Seeed SenseCap Indicator D1L support#46
carroarmato0 wants to merge 14 commits into
HermannBjorgvin:mainfrom
carroarmato0:feature/sensecap-indicator-d1l-v2

Conversation

@carroarmato0

Copy link
Copy Markdown

Summary

This PR adds firmware support for the Seeed Studio SenseCap Indicator D1L, following the HAL abstraction introduced in PR #25. It supersedes the earlier PR #13 which used #ifdef TARGET_SENSECAP throughout shared code.

Hardware

Component Details
SoC ESP32-S3, OPI PSRAM, 8 MB flash
Display 480×480 ST7701S, RGB parallel interface
Touch FT6x36 at I2C 0x48 (non-standard address), panel mounted 180°
IO expander PCA9535 at I2C 0x20 — gates LCD SPI CS (P04) and touch RST (P07)
Button GPIO 38, active-LOW, drives screen cycle / wake via power_hal_pwr_pressed
Battery / PMU None
IMU None

New files

All board-specific code lives in firmware/src/boards/sensecap_indicator_d1l/:

  • board.h — pin definitions, I2C addresses, BOARD_HAS_* flags
  • io_expander.h / io_expander.cpp — minimal PCA9535 raw-I2C driver (port 0 only, no external library)
  • board_init.cppWire.begin + io_expander_init (must run before display_hal_init)
  • caps.cppBoardCaps instance
  • display.cppArduino_RGB_Display driver; ST7701S init sequence over SPI gated by PCA9535 CS; PWM backlight on GPIO 45
  • touch.cpp — vendored minimal FT6x36 reader; 50 Hz poll (no INT pin); both axes flipped for 180° mount
  • power.cpp — edge-detected GPIO 38 PWR button at 50 Hz; all battery stubs return -1/false
  • input.cpp — stubs returning false (device has no microphone; PTT not applicable)
  • imu.cpp — no-op stubs

Shared-code changes (firmware/src/ui.cpp)

Two board-agnostic fixes proposed for upstream:

  1. Battery icon respects board_caps().has_batteryapply_battery_visibility() was documented to hide the battery widget on boards without a battery, but the check was never implemented. Fixed.

  2. Swipe gesture navigation — left/right swipes cycle screens; tap still toggles splash. Works on all boards. Also fixes a LVGL 9 quirk where a swipe fires a spurious LV_EVENT_CLICKED at lift-off (400 ms debounce guard in global_click_cb). make_panel() now explicitly sets LV_OBJ_FLAG_GESTURE_BUBBLE alongside EVENT_BUBBLE.

Hardware notes

  • ST7701S colour register: 0xCD = 0x08 (not 0x00 as in the Arduino_GFX type9 default — wrong value produces a permanent green tint).
  • No INPUT_BTN_PRIMARY: the D1L has no BOOT/GPIO0 button available as a general input. GPIO 38 is repurposed as the PWR button via power_hal_pwr_pressed; voice-mode PTT is permanently false, which is correct since the device has no microphone.
  • power_hal_is_vbus_in() returns false: the device has no USB VBUS detection. This intentionally allows the idle system to sleep the display after the timeout — desirable for a desk device that may run 24/7.
  • RGB parallel (non-QSPI) display: the porting guide mentions QSPI AMOLED panels, but the HAL contract is interface-only and accommodates the RGB parallel driver without any HAL changes.

Test plan

  • All three envs compile (sensecap_indicator_d1l, waveshare_amoled_216, waveshare_amoled_18)
  • Flashed and booted on hardware — splash animation visible, PCA9535 init OK, FT6x36 touch init OK
  • Button (GPIO 38) cycles screens and wakes from sleep
  • Touch swipe navigates screens; tap toggles splash
  • Battery icon hidden (no battery on this board)
  • No regressions on existing board envs

@carroarmato0

Copy link
Copy Markdown
Author
IMG20260529141426

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant