[][src]Struct ffp::Flash

pub struct Flash<'a> { /* fields omitted */ }

Flash manager

Methods

impl<'a> Flash<'a>[src]

pub fn new(programmer: &'a Programmer) -> Self[src]

Create a new Flash using the given Programmer

pub fn read_id(&self) -> Result<FlashID>[src]

Read the attached flash device, manufacturer, and unique IDs

pub fn read(&self, address: u32, length: usize) -> Result<Vec<u8>>[src]

Read length bytes of data from the attached flash, starting at address

pub fn program(&self, address: u32, data: &[u8], verify: bool) -> Result<()>[src]

Program the attached flash with data starting at address.

If verify is true, also read-back the programmed data and return FFPError::ReadbackError if it did not match what was written.

pub fn erase(&self) -> Result<()>[src]

Erase entire flash chip

pub fn reset(&self) -> Result<()>[src]

Reset the attached flash

pub fn power_down(&self) -> Result<()>[src]

Power down the attached flash

pub fn power_up(&self) -> Result<()>[src]

Power up the attached flash

Auto Trait Implementations

impl<'a> Send for Flash<'a>

impl<'a> Sync for Flash<'a>

Blanket Implementations

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

impl<T> From<T> for 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.

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

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

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