Skip to content

Commit 7b3418e

Browse files
mertzt89jessebraham
authored andcommitted
Wait for FlashDeflateEnd ack
When using the stub, the data sent in FlashDeflateData is not actually written to flash until after the ack is sent by the stub. Waiting for FlashDeflateEnd ensures that all data sent during with FlashDeflateData has been fully written.
1 parent a1fcd8c commit 7b3418e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

espflash/src/flash_target/esp32.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ impl FlashTarget for Esp32Target {
159159

160160
fn finish(&mut self, connection: &mut Connection, reboot: bool) -> Result<(), Error> {
161161
connection.with_timeout(CommandType::FlashDeflateEnd.timeout(), |connection| {
162-
connection.write_command(Command::FlashDeflateEnd { reboot: false })
162+
connection.command(Command::FlashDeflateEnd { reboot: false })
163163
})?;
164164
if reboot {
165165
connection.reset()

0 commit comments

Comments
 (0)