embassy-boot

Crates

0.1.1

Versions

default

Flavors

Struct MultiFlashConfig

Source
pub struct MultiFlashConfig<'a, ACTIVE, STATE, DFU>
where ACTIVE: Flash, STATE: Flash, DFU: Flash,
{ /* private fields */ }
Expand description

Convenience flash provider that uses separate flash instances for each partition.

Implementations§

Source§

impl<'a, ACTIVE, STATE, DFU> MultiFlashConfig<'a, ACTIVE, STATE, DFU>
where ACTIVE: Flash, STATE: Flash, DFU: Flash,

Source

pub fn new( active: &'a mut ACTIVE, state: &'a mut STATE, dfu: &'a mut DFU, ) -> Self

Create a new flash provider with separate configuration for all three partitions.

Trait Implementations§

Source§

impl<'a, ACTIVE, STATE, DFU> FlashConfig for MultiFlashConfig<'a, ACTIVE, STATE, DFU>
where ACTIVE: Flash, STATE: Flash, DFU: Flash,

Source§

type STATE = STATE

Flash type used for the state partition.
Source§

type ACTIVE = ACTIVE

Flash type used for the active partition.
Source§

type DFU = DFU

Flash type used for the dfu partition.
Source§

fn active(&mut self) -> &mut Self::ACTIVE

Return flash instance used to write/read to/from active partition.
Source§

fn dfu(&mut self) -> &mut Self::DFU

Return flash instance used to write/read to/from dfu partition.
Source§

fn state(&mut self) -> &mut Self::STATE

Return flash instance used to write/read to/from bootloader state.

Auto Trait Implementations§

§

impl<'a, ACTIVE, STATE, DFU> Freeze for MultiFlashConfig<'a, ACTIVE, STATE, DFU>

§

impl<'a, ACTIVE, STATE, DFU> RefUnwindSafe for MultiFlashConfig<'a, ACTIVE, STATE, DFU>
where ACTIVE: RefUnwindSafe, STATE: RefUnwindSafe, DFU: RefUnwindSafe,

§

impl<'a, ACTIVE, STATE, DFU> Send for MultiFlashConfig<'a, ACTIVE, STATE, DFU>
where ACTIVE: Send, STATE: Send, DFU: Send,

§

impl<'a, ACTIVE, STATE, DFU> Sync for MultiFlashConfig<'a, ACTIVE, STATE, DFU>
where ACTIVE: Sync, STATE: Sync, DFU: Sync,

§

impl<'a, ACTIVE, STATE, DFU> Unpin for MultiFlashConfig<'a, ACTIVE, STATE, DFU>

§

impl<'a, ACTIVE, STATE, DFU> !UnwindSafe for MultiFlashConfig<'a, ACTIVE, STATE, DFU>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.