diff options
author | Pete Johanson <peter@peterjohanson.com> | 2020-07-22 16:30:05 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-22 16:30:05 -0400 |
commit | 36f36f21f7bbdaf2443947c8ed3ef0f597b7e5f9 (patch) | |
tree | c2d7e993a43e16787d6c5999469f849654c8bd72 /app/dts/bindings | |
parent | 5896c3032b4d8c7ed4962672b75360a54c5b0e1c (diff) | |
parent | 5958bfed0bd764c50d1a926a29a419b6f99018d5 (diff) |
Merge pull request #61 from petejohanson/sensors/sensor-keymap-bindings
Add sensor handling to keymaps.
Diffstat (limited to 'app/dts/bindings')
-rw-r--r-- | app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml | 22 | ||||
-rw-r--r-- | app/dts/bindings/zmk,keymap-sensors.yaml | 9 | ||||
-rw-r--r-- | app/dts/bindings/zmk,layers.yaml | 3 |
3 files changed, 34 insertions, 0 deletions
diff --git a/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml new file mode 100644 index 0000000..bbf3537 --- /dev/null +++ b/app/dts/bindings/behaviors/zmk,behavior-sensor-rotate-key-press.yaml @@ -0,0 +1,22 @@ +# Copyright (c) 2020, Pete Johanson +# SPDX-License-Identifier: MIT + +description: Sensor rotate key press/release behavior + +compatible: "zmk,behavior-sensor-rotate-key-press" + +properties: + label: + type: string + required: true + "#sensor-binding-cells": + type: int + required: true + const: 2 + usage_page: + type: int + default: 0 + +sensor-binding-cells: + - param1 + - param2 diff --git a/app/dts/bindings/zmk,keymap-sensors.yaml b/app/dts/bindings/zmk,keymap-sensors.yaml new file mode 100644 index 0000000..c56361d --- /dev/null +++ b/app/dts/bindings/zmk,keymap-sensors.yaml @@ -0,0 +1,9 @@ +description: | + Allows defining the collection of sensors bound in the keymap layers + +compatible: "zmk,keymap-sensors" + +properties: + sensors: + type: phandles + required: true diff --git a/app/dts/bindings/zmk,layers.yaml b/app/dts/bindings/zmk,layers.yaml index 34cbb95..1a3592e 100644 --- a/app/dts/bindings/zmk,layers.yaml +++ b/app/dts/bindings/zmk,layers.yaml @@ -13,3 +13,6 @@ child-binding: bindings: type: phandle-array required: true + sensor-bindings: + type: phandle-array + required: false |