embassy-boot

Crates

0.1.1

Versions

default

Flavors

Trait FlashConfig

Source
pub trait FlashConfig {
    type STATE: Flash;
    type ACTIVE: Flash;
    type DFU: Flash;

    // Required methods
    fn active(&mut self) -> &mut Self::ACTIVE;
    fn dfu(&mut self) -> &mut Self::DFU;
    fn state(&mut self) -> &mut Self::STATE;
}
Expand description

Trait defining the flash handles used for active and DFU partition

Required Associated Types§

Source

type STATE: Flash

Flash type used for the state partition.

Source

type ACTIVE: Flash

Flash type used for the active partition.

Source

type DFU: Flash

Flash type used for the dfu partition.

Required Methods§

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.

Implementors§

Source§

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

Source§

type STATE = STATE

Source§

type ACTIVE = ACTIVE

Source§

type DFU = DFU

Source§

impl<'a, F> FlashConfig for SingleFlashConfig<'a, F>
where F: Flash,

Source§

type STATE = F

Source§

type ACTIVE = F

Source§

type DFU = F