diff options
author | Joel Spadin <joelspadin@gmail.com> | 2021-07-25 15:23:04 -0500 |
---|---|---|
committer | Pete Johanson <peter@peterjohanson.com> | 2021-09-08 14:34:28 -0400 |
commit | 82cb76269811105bbe89569367d888d7a3fdd083 (patch) | |
tree | 225d95eecdac7d22b4336de58958f28c43354127 /app/drivers/zephyr | |
parent | 2a9ab828b53b70539621ccb4ec4fa0cd47afc959 (diff) |
refactor(kscan): Demacroify GPIO matrix driver
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.
Diffstat (limited to 'app/drivers/zephyr')
-rw-r--r-- | app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml b/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml index 5ebcbdd..20ee4ac 100644 --- a/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml +++ b/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml @@ -17,6 +17,11 @@ properties: debounce-period: type: int default: 5 + description: Debounce time in milliseconds + poll-period-ms: + type: int + default: 10 + description: Time between reads in milliseconds when polling is enabled diode-direction: type: string default: row2col |