Sequences that reset an ESP into its serial bootloader.
Development boards wire DTR/RTS to EN/IO0 (classic/2); chips with a built-in
USB-JTAG/Serial peripheral need usb_jtag_serial/1; custom hardware can drive the
pins directly with gpio/2.
Summary
Functions
DTR/RTS sequence for boards with the usual EN/IO0 transistor circuit.
Holds IO0 low while pulsing EN, using Circuits.GPIO pin names.
Resets the chip so it boots normally; USB-OTG ports need a longer pulse.
Runs strategy; odd attempts use a longer classic delay, as esptool does.
Picks the strategy from connect options and the port's USB vendor/product ids.
DTR/RTS sequence for the built-in USB-JTAG/Serial peripheral.
Types
Functions
@spec classic(pid(), non_neg_integer()) :: :ok | {:error, term()}
DTR/RTS sequence for boards with the usual EN/IO0 transistor circuit.
Holds IO0 low while pulsing EN, using Circuits.GPIO pin names.
Resets the chip so it boots normally; USB-OTG ports need a longer pulse.
@spec run(strategy(), pid(), keyword(), non_neg_integer()) :: :ok | {:error, term()}
Runs strategy; odd attempts use a longer classic delay, as esptool does.
@spec strategy( keyword(), {non_neg_integer(), non_neg_integer()} | nil ) :: strategy()
Picks the strategy from connect options and the port's USB vendor/product ids.
DTR/RTS sequence for the built-in USB-JTAG/Serial peripheral.