summaryrefslogtreecommitdiff
path: root/app/include
diff options
context:
space:
mode:
authorPete Johanson <peter@peterjohanson.com>2020-08-21 00:33:48 -0400
committerPete Johanson <peter@peterjohanson.com>2020-08-21 11:23:45 -0400
commit805ea770053269278fe0ed443b68f600021d82d1 (patch)
treee36950a4fa09259c007069f458376a910b80ead4 /app/include
parent1ff13676f7fbab5c0d69317be0d186709a7872c8 (diff)
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.
Diffstat (limited to 'app/include')
-rw-r--r--app/include/dt-bindings/zmk/reset.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/include/dt-bindings/zmk/reset.h b/app/include/dt-bindings/zmk/reset.h
new file mode 100644
index 0000000..b513649
--- /dev/null
+++ b/app/include/dt-bindings/zmk/reset.h
@@ -0,0 +1,12 @@
+/*
+ * Copyright (c) 2020 Peter Johanson <peter@peterjohanson.com>
+ *
+ * SPDX-License-Identifier: MIT
+ */
+
+#define RST_WARM 0x00
+#define RST_COLD 0x01
+
+// AdaFruit nrf52 Bootloader Specific. See https://github.com/adafruit/Adafruit_nRF52_Bootloader/blob/d6b28e66053eea467166f44875e3c7ec741cb471/src/main.c#L107
+
+#define RST_UF2 0x57 \ No newline at end of file