Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions embassy-usb-dfu/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
<!-- next-header -->
## Unreleased - ReleaseDate

- changed: Do not reset in the GetStatus request
- Allow enabling the `application` and `dfu` feature at the same time

## 0.2.0 - 2025-08-27
Expand Down
8 changes: 7 additions & 1 deletion embassy-usb-dfu/src/dfu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl<'d, DFU: NorFlash, STATE: NorFlash, RST: Reset, const BLOCK_SIZE: usize> Ha
Ok(Request::GetStatus) => {
match self.state {
State::DlSync => self.state = State::Download,
State::ManifestSync => self.reset.sys_reset(),
State::ManifestSync => self.state = State::ManifestWaitReset,
_ => {}
}

Expand All @@ -202,6 +202,12 @@ impl<'d, DFU: NorFlash, STATE: NorFlash, RST: Reset, const BLOCK_SIZE: usize> Ha
_ => None,
}
}

fn reset(&mut self) {
if matches!(self.state, State::ManifestSync | State::ManifestWaitReset) {
self.reset.sys_reset()
}
}
}

/// An implementation of the USB DFU 1.1 protocol
Expand Down