Prevent accidental revert when using firmware updater
This change prevents accidentally overwriting the previous firmware before the new one has been marked as booted.
This commit is contained in:
@@ -26,6 +26,8 @@ pub enum FirmwareUpdaterError {
|
||||
Flash(NorFlashErrorKind),
|
||||
/// Signature errors.
|
||||
Signature(signature::Error),
|
||||
/// Bad state.
|
||||
BadState,
|
||||
}
|
||||
|
||||
#[cfg(feature = "defmt")]
|
||||
@@ -34,6 +36,7 @@ impl defmt::Format for FirmwareUpdaterError {
|
||||
match self {
|
||||
FirmwareUpdaterError::Flash(_) => defmt::write!(fmt, "FirmwareUpdaterError::Flash(_)"),
|
||||
FirmwareUpdaterError::Signature(_) => defmt::write!(fmt, "FirmwareUpdaterError::Signature(_)"),
|
||||
FirmwareUpdaterError::BadState => defmt::write!(fmt, "FirmwareUpdaterError::BadState"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user