/** * Safe-mode recovery for crash-looping devices. * * Two independent reset paths, run back-to-back so at least one fires: * * 1. In-band CMD_RESTART frame. If the device is currently in the protocol * loop (responsive, not crash-looping) the firmware handler calls * esp_restart() and we get a clean software reset. Also handles the * common "crash-looping but briefly responsive" case. * * 2. Hardware RTS/DTR reset matching esptool's HardReset(uses_usb=True). * DTR pinned to false so IO0 stays high and the chip boots normally * instead of entering the ROM bootloader. Covers genuinely stuck devices * where the protocol is not responding at all. * * After the reset attempts, we flood the firmware's recovery sync sequence * ("MIKSAFE\n") so mik__check_recovery() picks it up during its boot window * and skips user-app autorun. The firmware's RTC_NOINIT_ATTR double-reset * detection makes path 1 + path 2 firing back-to-back safe. * * Pairs with the firmware-side window in mik_recovery.cpp. */ import type { SerialPort } from 'serialport'; export declare function triggerSafeMode(serial: SerialPort, floodMs?: number): Promise; //# sourceMappingURL=recover.d.ts.map