feat(behaviors): Add &bootloader behavior.

* Allow reset behavior to have a type property.
* Add `bootloader` node that triggers DFU UF2
  bootloader mode using the AdaFruit nrf52
  bootloader.
This commit is contained in:
Pete Johanson
2020-08-21 00:33:48 -04:00
parent 1ff13676f7
commit 805ea77005
6 changed files with 87 additions and 12 deletions

View File

@@ -1,3 +1,5 @@
#include <dt-bindings/zmk/reset.h>
/ {
behaviors {
reset: behavior_reset {
@@ -5,5 +7,12 @@
label = "RESET";
#binding-cells = <0>;
};
bootloader: behavior_reset_dfu {
compatible = "zmk,behavior-reset";
label = "BOOTLOADER_RESET";
type = <RST_UF2>;
#binding-cells = <0>;
};
};
};

View File

@@ -6,3 +6,8 @@ description: Keyboard Reset Behavior
compatible: "zmk,behavior-reset"
include: zero_param.yaml
properties:
type:
type: int
default: 0