From 82cb76269811105bbe89569367d888d7a3fdd083 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 25 Jul 2021 15:23:04 -0500 Subject: 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. --- app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/drivers/zephyr') 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 -- cgit v1.2.3