BootloaderSectionCallbacks

Trait BootloaderSectionCallbacks 

Source
pub trait BootloaderSectionCallbacks: Sync {
    // Required methods
    fn erase(&self) -> bool;
    fn write(&self, data: &[u8]);
    fn finalize(&self) -> bool;
}
Expand description

A trait for applications to implement to provide a bootloader section access implementation

Required Methods§

Source

fn erase(&self) -> bool

Called to erase the section

Returns true if section is successfully erased and ready for programming

Source

fn write(&self, data: &[u8])

Write a chunk of data

Write will be called 1 or more times after an erase with a sequence of new data to write to the section

Source

fn finalize(&self) -> bool

Finalize writing a section

Will be called once after all data has been written to allow the storage driver to finalize writing the data and return any errors.

Returns true on successful write

Implementors§