82cb762698
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.
30 lines
614 B
YAML
30 lines
614 B
YAML
# Copyright (c) 2020, Pete Johanson
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
description: GPIO keyboard matrix controller
|
|
|
|
compatible: "zmk,kscan-gpio-matrix"
|
|
|
|
include: kscan.yaml
|
|
|
|
properties:
|
|
row-gpios:
|
|
type: phandle-array
|
|
required: true
|
|
col-gpios:
|
|
type: phandle-array
|
|
required: true
|
|
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
|
|
enum:
|
|
- row2col
|
|
- col2row
|