Expand description
USB-CDC DFU rescue paths.
Two low-level mechanisms for getting the device into DFU mode independent of the CLI session:
-
TouchlessResetWatcher— watches CDC control requests for the 1200-baud touchless reset (host opens port at 1200 baud and then drops DTR). This is howflasher.meshcore.co.ukandadafruit-nrfutil --touch 1200trigger DFU. The Adafruit nRF52 bootloader does not implement this; firmware is responsible. -
EscapeWatcher— observes the inbound byte stream and fires when the magic sequenceCtrl-C Ctrl-C Ctrl-C dfu\rappears. Used when the CLI parser is wedged (panicked task, deadlocked channel, mis-parsed mode) so a human at a terminal can still force DFU.
Both mechanisms run below the CLI parser so a hung or mis-configured CLI can’t block them. The escape watcher deliberately observes without consuming, so the CLI parser still sees all bytes — Ctrl-C continues to mean “abort” to the CLI even while the rescue prefix accumulates.
Structs§
- Escape
Watcher - Observes inbound CDC bytes for the rescue prefix
Ctrl-C Ctrl-C Ctrl-C dfufollowed by\ror\n. On match, returnsRescueAction::TriggerDfuso the caller can put the device into serial DFU mode independent of the CLI session. - Touchless
Reset Watcher - Watcher for the 1200-baud touchless reset.
Enums§
- Rescue
Action - What a watcher decided to do as a result of an input event.