[][src]Struct probe_rs::flash::loader::FlashLoader

pub struct FlashLoader<'a, 'b> { /* fields omitted */ }

FlashLoader is a struct which manages the flashing of any chunks of data onto any sections of flash. Use add_data() to add a chunks of data. Once you are done adding all your data, use commit() to flash the data. The flash loader will make sure to select the appropriate flash region for the right data chunks. Region crossing data chunks are allowed as long as the regions are contiguous.

Methods

impl<'a, 'b> FlashLoader<'a, 'b>[src]

pub fn new(memory_map: &'a [MemoryRegion], keep_unwritten: bool) -> Self[src]

pub fn add_data(
    &mut self,
    address: u32,
    data: &'b [u8]
) -> Result<(), FlashLoaderError>
[src]

Stages a junk of data to be programmed.

The chunk can cross flash boundaries as long as one flash region connects to another flash region.

pub fn get_region_for_address(
    memory_map: &[MemoryRegion],
    address: u32
) -> Option<&MemoryRegion>
[src]

pub fn commit(
    &mut self,
    session: &mut Session,
    progress: &FlashProgress,
    do_chip_erase: bool
) -> Result<(), FlashLoaderError>
[src]

Writes all the stored data chunks to flash.

Requires a session with an attached target that has a known flash algorithm.

If do_chip_erase is true the entire flash will be erased.

Auto Trait Implementations

impl<'a, 'b> RefUnwindSafe for FlashLoader<'a, 'b>

impl<'a, 'b> Send for FlashLoader<'a, 'b>

impl<'a, 'b> Sync for FlashLoader<'a, 'b>

impl<'a, 'b> Unpin for FlashLoader<'a, 'b>

impl<'a, 'b> UnwindSafe for FlashLoader<'a, 'b>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.