zmk/app/dts/behaviors/reset.dtsi
Joel Spadin 4b57588884 refactor: Move reset logic to a new function
Moved the logic to select the type of reboot from behavior_reset.c to a
new zmk_reset() function. This allows rebooting to bootloader from
other code, and it gives us a starting point for future work to support
other bootloaders aside from the Adafruit nrf52 bootloader.
2023-04-29 23:27:17 -05:00

24 lines
521 B
Text

/*
* Copyright (c) 2020 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/
#include <dt-bindings/zmk/reset.h>
/ {
behaviors {
sys_reset: behavior_reset {
compatible = "zmk,behavior-reset";
label = "SYSRESET";
#binding-cells = <0>;
};
bootloader: behavior_reset_dfu {
compatible = "zmk,behavior-reset";
label = "BOOTLOAD";
type = <ZMK_RESET_BOOTLOADER>;
#binding-cells = <0>;
};
};
};