[−][src]Struct probe_rs::flash::loader::FlashLoader
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]
&mut self,
address: u32,
data: &'b [u8]
) -> Result<(), FlashLoaderError>
Stages a chunk 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]
memory_map: &[MemoryRegion],
address: u32
) -> Option<&MemoryRegion>
pub fn commit(
&mut self,
session: &Session,
progress: &FlashProgress,
do_chip_erase: bool
) -> Result<(), FlashLoaderError>
[src]
&mut self,
session: &Session,
progress: &FlashProgress,
do_chip_erase: bool
) -> Result<(), FlashLoaderError>
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,