#[repr(u32)]pub enum OtaImageState {
New = 0,
PendingVerify = 1,
Valid = 2,
Invalid = 3,
Aborted = 4,
Undefined = 4_294_967_295,
}
Expand description
OTA image states for checking operability of the app.
Variants§
New = 0
Monitor the first boot. The bootloader will change this to
PendingVerify
if auto-rollback is enabled.
You want to set this state after activating a newly installed update.
PendingVerify = 1
Bootloader changes OtaImageState::New to OtaImageState::PendingVerify to indicate the app should confirm the image as working.
Valid = 2
Set by the firmware once it’s found to be working. The bootloader will consider this Slot as working and continue to use it.
Invalid = 3
Set by the firmware once it’s found to be non-working.
The bootloader will consider this Slot as non-working and not try to boot it further.
Aborted = 4
The bootloader will change the state to OtaImageState::Aborted if the application didn’t change OtaImageState::PendingVerify to either OtaImageState::Valid or OtaImageState::Invalid.
Undefined = 4_294_967_295
Undefined. The bootloader won’t make any assumptions about the working state of this slot.
Implementations§
Source§impl OtaImageState
impl OtaImageState
Sourcepub const fn from_repr(discriminant: u32) -> Option<OtaImageState>
pub const fn from_repr(discriminant: u32) -> Option<OtaImageState>
Try to create Self from the raw representation
Trait Implementations§
Source§impl Clone for OtaImageState
impl Clone for OtaImageState
Source§fn clone(&self) -> OtaImageState
fn clone(&self) -> OtaImageState
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moreSource§impl Debug for OtaImageState
impl Debug for OtaImageState
Source§impl Default for OtaImageState
impl Default for OtaImageState
Source§fn default() -> OtaImageState
fn default() -> OtaImageState
Source§impl Format for OtaImageState
impl Format for OtaImageState
Source§impl Hash for OtaImageState
impl Hash for OtaImageState
Source§impl PartialEq for OtaImageState
impl PartialEq for OtaImageState
Source§impl TryFrom<u32> for OtaImageState
impl TryFrom<u32> for OtaImageState
impl Copy for OtaImageState
impl Eq for OtaImageState
impl StructuralPartialEq for OtaImageState
Auto Trait Implementations§
impl Freeze for OtaImageState
impl RefUnwindSafe for OtaImageState
impl Send for OtaImageState
impl Sync for OtaImageState
impl Unpin for OtaImageState
impl UnwindSafe for OtaImageState
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit
)