mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-21 06:12:32 +00:00
Fix get_state in cases where WRITE_SIZE != 1
This commit is contained in:
parent
5bc4796b96
commit
682504eb0e
@ -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