mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 14:22:33 +00:00
Merge pull request #3507 from MathiasKoch/fix/bootloader-async-updater
fix(*): FirmwareUpdater::get_state in cases where READ_SIZE != WRITE_SIZE
This commit is contained in:
commit
e4f611b97c
@ -304,7 +304,7 @@ impl<'d, STATE: NorFlash> FirmwareState<'d, STATE> {
|
||||
/// `mark_booted`.
|
||||
pub async fn get_state(&mut self) -> Result<State, FirmwareUpdaterError> {
|
||||
self.state.read(0, &mut self.aligned).await?;
|
||||
Ok(State::from(&self.aligned))
|
||||
Ok(State::from(&self.aligned[..STATE::WRITE_SIZE]))
|
||||
}
|
||||
|
||||
/// Mark to trigger firmware swap on next boot.
|
||||
|
Loading…
Reference in New Issue
Block a user