zmk_mf68/app/drivers/zephyr/dts/bindings/kscan/zmk,kscan-gpio-matrix.yaml
Joel Spadin 82cb762698 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.
2021-09-08 14:34:28 -04:00

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