at main
9 folders
5 files
Add trackball driver layer: ITrackball, quadrature driver, factory
Bring the trackball to the same device-driver structure as PMIC/RTC/IMU/
keyboard. A trackball is a passive GPIO device — no bus, registers, or chip
identity — so the layer is honest about that: it cannot be electrically
probed, and its motion needs a physical finger.
- i_trackball.h: device-level ITrackball contract (init/isAvailable/name,
drainSteps raw quadrature snapshot, isClickDown, inject, selfTest) + the
QuadratureSteps transport struct.
- quadrature_trackball.{h,cpp}: generic four-direction + click GPIO quadrature
driver parameterized on its pin mapping (the T-Deck is one mapping). Holds
the falling-edge IRAM ISRs, ISR-resident step accumulators and velocity
timestamps (a hardware singleton), moved verbatim from the HAL wrapper so
ISR discipline and velocity math are unchanged.
- trackball_factory.{h,cpp}: flag-gated createTrackball (TRACKBALL_TYPE_*,
like the LilyGo keyboard leg) with a natively-testable constexpr classifier
and pin-validity check standing in for the impossible address probe; returns
the shared NullTrackball otherwise.
- trackball_selftest.h: pure, hardware-free pass/fail helpers (drain coherence,
informational click-idle level, overall gate) — the passive-device analogue
of imu_selftest.h / keyboard_selftest.h.
- null_trackball.h: never-null no-op driver for boards without a trackball.
- TRACKBALL_TYPE_QUADRATURE flag default (platform_defaults.h) + T-Deck enable;
drv_trackball Doxygen group.
Claude-Session: https://claude.ai/code/session_01SV58JXhfxhhc9DC6vdjBo4
Add per-variant _release targets and Secure Boot upload guard
Give every device variant the full four-tier target set: base, _debug,
_release, and _secure. Previously only sticks3 had an explicit _release
env; the other variants jumped from the unsuffixed base build straight to
_secure, leaving no re-flashable open-production target.
- Add [env:<variant>_release] to cardputer, core2_v13, cores3_se,
m5core_ink, m5stack_gray, m5stickc_plus1, m5stickc_plus2, and tdeck.
Each extends its base env, unflags CORE_DEBUG_LEVEL=1, and sets
KLEIDOS_RELEASE=1 + CORE_DEBUG_LEVEL=0 (the proven _secure build_flags
minus the eFuse-burning secure partitions/cmake/guard). Partitions are
inherited from each variant's base env.
- The 4 MB / no-OTA boards (m5stickc_plus1, m5core_ink) get _release but
intentionally keep NO _secure target: Secure Boot v2 + Flash Encryption
needs 8 MB+ flash and these boards update by full re-flash.
- Add secure partition tables (partitions_8mb_secure.csv,
partitions_16mb_secure.csv) and scripts/secure_upload_guard.py, an
interactive PlatformIO pre-upload guard that forces explicit human
confirmation before flashing any irreversible *_secure image.
- Refresh sign_firmware.sh notes and the espsecure.py invocation; align
sdkconfig.release.defaults.opt-in.
Validated: scripts/check_variants.py reports 37 environments; building
m5stickc_plus2_release succeeds.
Add per-variant _release targets and Secure Boot upload guard
Give every device variant the full four-tier target set: base, _debug,
_release, and _secure. Previously only sticks3 had an explicit _release
env; the other variants jumped from the unsuffixed base build straight to
_secure, leaving no re-flashable open-production target.
- Add [env:<variant>_release] to cardputer, core2_v13, cores3_se,
m5core_ink, m5stack_gray, m5stickc_plus1, m5stickc_plus2, and tdeck.
Each extends its base env, unflags CORE_DEBUG_LEVEL=1, and sets
KLEIDOS_RELEASE=1 + CORE_DEBUG_LEVEL=0 (the proven _secure build_flags
minus the eFuse-burning secure partitions/cmake/guard). Partitions are
inherited from each variant's base env.
- The 4 MB / no-OTA boards (m5stickc_plus1, m5core_ink) get _release but
intentionally keep NO _secure target: Secure Boot v2 + Flash Encryption
needs 8 MB+ flash and these boards update by full re-flash.
- Add secure partition tables (partitions_8mb_secure.csv,
partitions_16mb_secure.csv) and scripts/secure_upload_guard.py, an
interactive PlatformIO pre-upload guard that forces explicit human
confirmation before flashing any irreversible *_secure image.
- Refresh sign_firmware.sh notes and the espsecure.py invocation; align
sdkconfig.release.defaults.opt-in.
Validated: scripts/check_variants.py reports 37 environments; building
m5stickc_plus2_release succeeds.