Struct UnlockedFlash

Source
pub struct UnlockedFlash { /* private fields */ }
Expand description

Handle for an unlocked flash on which operations can be performed

Implementations§

Source§

impl UnlockedFlash

Source

pub fn lock(self) -> FLASH

Consumes the unlocked flash instance returning the locked one

Trait Implementations§

Source§

impl Read for UnlockedFlash

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 WriteErase for UnlockedFlash

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§

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.