Struct FlashProgramming

Source
pub struct FlashProgramming<'a> { /* private fields */ }
Expand description

Flash programming interface

Implementations§

Source§

impl<'a> FlashProgramming<'a>

Source

pub fn erase_all_pages(&mut self) -> Result

Erase all flash pages, note that this will erase the current running program if it is not called from a program running in RAM.

Trait Implementations§

Source§

impl<'a> Drop for FlashProgramming<'a>

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more
Source§

impl<'a> Read for FlashProgramming<'a>

Source§

type NativeType = u8

Native type of the flash for reading with the correct alignment of the memory and size Read more
Source§

fn read_native(&self, address: usize, array: &mut [Self::NativeType])

Read from the flash memory using the native interface
Source§

fn read(&self, address: usize, buf: &mut [u8])

Read a buffer of bytes from memory
Source§

impl<'a> WriteErase for FlashProgramming<'a>

Source§

type NativeType = u64

Native type of the flash for writing with the correct alignment and size Read more
Source§

fn status(&self) -> Result

check flash status
Source§

fn erase_page(&mut self, page: FlashPage) -> Result

Erase specified flash page.
Source§

fn write_native(&mut self, address: usize, array: &[Self::NativeType]) -> Result

The smallest possible write, depends on platform
Source§

fn write(&mut self, address: usize, data: &[u8]) -> Result

Read a buffer of bytes to memory, this uses the native writes internally and if it’s not the same length and a set of native writes the write will be padded to fill a native write.

Auto Trait Implementations§

§

impl<'a> Freeze for FlashProgramming<'a>

§

impl<'a> RefUnwindSafe for FlashProgramming<'a>

§

impl<'a> Send for FlashProgramming<'a>

§

impl<'a> Sync for FlashProgramming<'a>

§

impl<'a> Unpin for FlashProgramming<'a>

§

impl<'a> !UnwindSafe for FlashProgramming<'a>

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.