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

@@ -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