summaryrefslogtreecommitdiff
path: root/app/dts
diff options
context:
space:
mode:
authorAlessandro Bortolin <bortolin.alessandro@outlook.it>2021-10-09 18:24:37 +0200
committerPete Johanson <peter@peterjohanson.com>2022-02-05 23:40:18 -0500
commit85b2d30bd521424686ba7f1c5ac4fe492f5f2ca5 (patch)
tree1ad816bdd5a2822fcda60955878b4b665927cdaf /app/dts
parent84365e6def9f9084b6c166d250aa84638c0e288f (diff)
feat(lighting): add backlight behavior
Diffstat (limited to 'app/dts')
-rw-r--r--app/dts/behaviors.dtsi1
-rw-r--r--app/dts/behaviors/backlight.dtsi15
-rw-r--r--app/dts/bindings/behaviors/zmk,behavior-backlight.yaml8
3 files changed, 24 insertions, 0 deletions
diff --git a/app/dts/behaviors.dtsi b/app/dts/behaviors.dtsi
index 0648961..3e797cc 100644
--- a/app/dts/behaviors.dtsi
+++ b/app/dts/behaviors.dtsi
@@ -16,3 +16,4 @@
#include <behaviors/outputs.dtsi>
#include <behaviors/caps_word.dtsi>
#include <behaviors/key_repeat.dtsi>
+#include <behaviors/backlight.dtsi>
diff --git a/app/dts/behaviors/backlight.dtsi b/app/dts/behaviors/backlight.dtsi
new file mode 100644
index 0000000..b05d97a
--- /dev/null
+++ b/app/dts/behaviors/backlight.dtsi
@@ -0,0 +1,15 @@
+/*
+ * Copyright (c) 2021 The ZMK Contributors
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+ / {
+ behaviors {
+ /omit-if-no-ref/ bl: behavior_backlight {
+ compatible = "zmk,behavior-backlight";
+ label = "BACKLIGHT";
+ #binding-cells = <1>;
+ };
+ };
+};
diff --git a/app/dts/bindings/behaviors/zmk,behavior-backlight.yaml b/app/dts/bindings/behaviors/zmk,behavior-backlight.yaml
new file mode 100644
index 0000000..e035e15
--- /dev/null
+++ b/app/dts/bindings/behaviors/zmk,behavior-backlight.yaml
@@ -0,0 +1,8 @@
+# Copyright (c) 2021 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+description: Backlight behavior
+
+compatible: "zmk,behavior-backlight"
+
+include: one_param.yaml