feat(boards): Add Seeed SenseCap Indicator D1L support#46
Open
carroarmato0 wants to merge 14 commits into
Open
feat(boards): Add Seeed SenseCap Indicator D1L support#46carroarmato0 wants to merge 14 commits into
carroarmato0 wants to merge 14 commits into
Conversation
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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_SENSECAPthroughout shared code.Hardware
power_hal_pwr_pressedNew files
All board-specific code lives in
firmware/src/boards/sensecap_indicator_d1l/:board.h— pin definitions, I2C addresses,BOARD_HAS_*flagsio_expander.h/io_expander.cpp— minimal PCA9535 raw-I2C driver (port 0 only, no external library)board_init.cpp—Wire.begin+io_expander_init(must run beforedisplay_hal_init)caps.cpp—BoardCapsinstancedisplay.cpp—Arduino_RGB_Displaydriver; ST7701S init sequence over SPI gated by PCA9535 CS; PWM backlight on GPIO 45touch.cpp— vendored minimal FT6x36 reader; 50 Hz poll (no INT pin); both axes flipped for 180° mountpower.cpp— edge-detected GPIO 38 PWR button at 50 Hz; all battery stubs return -1/falseinput.cpp— stubs returning false (device has no microphone; PTT not applicable)imu.cpp— no-op stubsShared-code changes (
firmware/src/ui.cpp)Two board-agnostic fixes proposed for upstream:
Battery icon respects
board_caps().has_battery—apply_battery_visibility()was documented to hide the battery widget on boards without a battery, but the check was never implemented. Fixed.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_CLICKEDat lift-off (400 ms debounce guard inglobal_click_cb).make_panel()now explicitly setsLV_OBJ_FLAG_GESTURE_BUBBLEalongsideEVENT_BUBBLE.Hardware notes
0xCD = 0x08(not0x00as in the Arduino_GFX type9 default — wrong value produces a permanent green tint).INPUT_BTN_PRIMARY: the D1L has no BOOT/GPIO0 button available as a general input. GPIO 38 is repurposed as the PWR button viapower_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.Test plan
sensecap_indicator_d1l,waveshare_amoled_216,waveshare_amoled_18)