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.
This commit is contained in:
Joel Spadin
2021-07-25 15:23:04 -05:00
committed by Pete Johanson
parent 2a9ab828b5
commit 82cb762698
2 changed files with 428 additions and 271 deletions

View File

@@ -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