[−][src]Struct ffp::Flash
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> RefUnwindSafe for Flash<'a>
impl<'a> Send for Flash<'a>
impl<'a> Sync for Flash<'a>
impl<'a> Unpin for Flash<'a>
impl<'a> UnwindSafe for Flash<'a>
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>,