pub struct MoonbootManager<InternalMemory: Storage, HardwareState: State, CPU: Processor, const INTERNAL_PAGE_SIZE: usize> { /* private fields */ }
Expand description

Instantiate this in your application to enable mutation of the State specified in this and jump to the bootloader to apply any updates.

Implementations

Destroy this instance of the boot manager and return access to the hardware peripheral

Run this immediately after booting your new image successfully to mark the boot as succesful. If you do not do this, any reset will cause the bootloader to restore to the previous firmware image.

Trait Implementations

Easily get read access to the update bank

Converts this type into a shared reference of the (usually inferred) input type.

Read Access to the current update target slot

An enumeration of storage errors

Read a slice of data from the storage peripheral, starting the read operation at the given address offset, and reading bytes.len() bytes. Read more

The capacity of the storage peripheral in bytes.

Write Access to the current update target slot

Write a slice of data to the storage peripheral, starting the write operation at the given address offset (between 0 and self.capacity()). Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.