summaryrefslogtreecommitdiff
path: root/app/drivers/kscan
AgeCommit message (Collapse)Author
2021-10-26feat(kscan): Improve matrix debouncingJoel Spadin
Switched the GPIO matrix driver to debouncing using a simple integrator algorithm. Whenever a key is pressed, we now scan at a rate controlled by debounce-scan-period-ms (default 1 ms) until all keys are released, then return to either waiting for an interrupt or polling more slowly. The timers for key press and release can now be controlled separately, so debounce-period is deprecated in favor of debounce-press-ms and debounce-release-ms. Global Kconfig options ZMK_KSCAN_DEBOUNCE_PRESS_MS and ZMK_KSCAN_DEBOUNCE_RELEASE_MS are also added to make these easier to set. Added documentation for debouncing options.
2021-09-14fix(kscan): Allow composite driver to handle missing children.Pete Johanson
For split keyboards using an IO expander over TRRS/i2c, if the right half isn't connected, we should be able to gracefully fallback to the left side still working.
2021-09-08refactor(kscan): Demacroify GPIO matrix driverJoel Spadin
Refactored the GPIO matrix kscan driver so that only the data and config structures are defined in the foreach macro. Functionality is unchanged except for the addition of DT properties to adjust polling speed. This should make it easier to add other enhancements later, like improved and customizable debounce behavior.
2021-07-17refactor(core): Move away from deprecated DT API.Pete Johanson
* Move to `DEVICE_DT_INST_DEFINE` everywhere. See: https://docs.zephyrproject.org/2.5.0/releases/release-notes-2.5.html#deprecated-in-this-release PR: https://github.com/zmkfirmware/zmk/pull/736
2021-06-08fix(kscan): Fix nibble demux scan errors on encoder rowJay Greco
+ Add a 1us sleep to let the column selection settle in order to avoid spurious keypresses when row capacitance is high (like on the encoder row)
2021-03-15fix(kscan): Proper direct wire warning message.Pete Johanson
2021-02-27Fix the label for the GPIO kscan driver.Pete Johanson
2021-02-02refactor(kscan): Fix polling of GPIO matrices.Pete Johanson
* Add easier macros for conditional polling/interrupt code. * Properly continue polling on intervals, without extra enable/disable code for pins that is superfluous when not trying to deal with interupts firing. * Fix to allow multiple GPIO drivers when doing splits w/ IO expanders
2021-02-02refactor(kscan): Remove explicit default n from kscan configs.Pete Johanson
* Actually allow defaulting yes in other places.
2020-12-28refactor: replace filename hyphens with underscoresinnovaker
Aligns *.h and *.c to underscore naming convention. These were kept (with warnings) for backwards compatibility with external boards/shields: - kscan-mock.h - matrix-transform.h They should be removed in the future. PR: #523
2020-12-14refactor(app): replace `struct device *` with `const struct device *`innovaker
Replaced with RegExp: /(?<!const )(struct device \*)/g See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace `driver_data` with `data`innovaker
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace `config_info` with `config`innovaker
See: https://docs.zephyrproject.org/latest/releases/release-notes-2.4.html PR: #467
2020-12-14refactor(app): replace Zephyr integer types with C99 integer typesinnovaker
u8_t → uint8_t u16_t → uint16_t u32_t → uint32_t u64_t → uint64_t s8_t → int8_t s16_t → int16_t s32_t → int32_t s64_t → int64_t Prerequisite for #223 See: https://github.com/zephyrproject-rtos/zephyr/releases/tag/zephyr-v2.4.0 PR: #467
2020-12-08fix(kscan): Fix building kscan for tests.Pete Johanson
2020-12-03refactor: Align drivers with Zephyr file system conventionsinnovaker
PR: #400