Skip to main content

Module buttons

Module buttons 

Source
Expand description

Unified front-panel button events.

Both input flavours of the M5Stack Core family emit the same ButtonEvent: the Fire27’s three physical buttons (Buttons, feature buttons) and the CoreS3’s touch-strip emulation (crate::io::touch_buttons::TouchButtons). An application maps these to its own events in one place, identically for both boards.

Structs§

ButtonEvent
A generic, positional input event — the #32 I1/I6 contract: it carries only where (id) and what kind (action), never app semantics (no Inc/Dec/Ok, no nav). Both the Fire27 physical buttons and the CoreS3 touch zones emit this same type, so a consumer’s input router maps it to meaning; the BSP never does. Do not add app-vocabulary variants here.
ButtonResources
The three front-panel button pins (Fire27: A=GPIO39, B=GPIO38, C=GPIO37, active-low). Wired by crate::board::fire27::Board::split.
ButtonTiming
Press-decoding timing shared by both front-panel drivers — the Fire27 physical buttons (ButtonResources::into_buttons_with_timing, feature buttons) and the CoreS3 touch strip (TouchButtonsConfig::with_timing). Milliseconds (the touch driver’s native unit; the Fire27 async-button Durations are built from these).
Buttons
The three debounced front-panel buttons.

Enums§

ButtonAction
ButtonId
Which of the three front-panel positions fired. On the Fire27 these are buttons A/B/C; on the CoreS3, the left/center/right touch zones.