M5Unit-KEYBOARD 0.1.0 git rev:b58d024
Loading...
Searching...
No Matches
m5::unit::UnitTab5Keyboard::config_t Struct Reference

Settings for begin. More...

#include <unit_Tab5Keyboard.hpp>

Public Attributes

bool start_periodic {true}
 
tab5_keyboard::Mode mode {tab5_keyboard::Mode::Normal}
 
int8_t irq_pin {50}
 
uint32_t interval_ms {50}
 
bool software_repeat {false}
 
uint32_t repeat_initial_ms {400}
 
uint32_t repeat_rate_ms {80}
 Interval between subsequent repeat events (milliseconds).
 
uint32_t holding_threshold_ms {800}
 

Detailed Description

Settings for begin.

Member Data Documentation

◆ holding_threshold_ms

uint32_t m5::unit::UnitTab5Keyboard::config_t::holding_threshold_ms {800}

Hold detection threshold (milliseconds).

Note
Used by the bitwise tracker for isHolding() / wasHold(). Normal mode only; HID and Character modes do not track bitwise state.

◆ interval_ms

uint32_t m5::unit::UnitTab5Keyboard::config_t::interval_ms {50}

Polling interval in milliseconds for non-interrupt-driven operation.

Note
Used only when update() is NOT INT-gated (irq_pin < 0, INT disabled, software_repeat, or a forced update). In that mode the device event queue is drained at most once per interval_ms. When INT-driven, draining is event-driven and this value is unused.

◆ irq_pin

int8_t m5::unit::UnitTab5Keyboard::config_t::irq_pin {50}

GPIO pin number connected to the active-low INT signal. Default is 50 (Tab5 ExtPort1 J9 pin 10, confirmed via M5Tab5-UserDemo BSP). Set to a valid GPIO number (0..GPIO_NUM_MAX-1) to enable ISR-driven event polling. Set to -1 to disable INT-driven mode and use unconditional polling.

◆ mode

tab5_keyboard::Mode m5::unit::UnitTab5Keyboard::config_t::mode {tab5_keyboard::Mode::Normal}

Initial keyboard operation mode applied during begin() (REG_MODE_KEYBOARD 0x10). Default is Mode::Normal (matrix coordinate events).

◆ repeat_initial_ms

uint32_t m5::unit::UnitTab5Keyboard::config_t::repeat_initial_ms {400}

Initial delay before the first repeat event is emitted (milliseconds).

Note
Measured from the press time recorded for the currently held key.
Also used as the bitwise "repeating" threshold (see isRepeating()).

◆ software_repeat

bool m5::unit::UnitTab5Keyboard::config_t::software_repeat {false}

Enable software auto-repeat (Normal mode only).

Note
Effective only when mode == tab5_keyboard::Mode::Normal. In HID and Character modes this flag is ignored because repeat handling is owned by the device firmware (or there is no row/col context to repeat). The repeat state is automatically cleared by a release event and by writeMode().

◆ start_periodic

bool m5::unit::UnitTab5Keyboard::config_t::start_periodic {true}

Start periodic measurement during begin() (mirrors the other M5Unit keyboards). When true, begin() calls startPeriodicMeasurement(), which enables the INT for the active mode (only if irq_pin >= 0) and begins draining events. Set false to defer and call startPeriodicMeasurement() manually later.