[][src]Struct dfu::core::Dfu

pub struct Dfu { /* fields omitted */ }

Implementations

impl Dfu[src]

pub fn from_bus_device(
    bus: u8,
    dev: u8,
    iface: u32,
    alt: u32
) -> Result<Self, Error>
[src]

pub fn get_status(&mut self, retries: u8) -> Result<Status, Error>[src]

pub fn clear_status(&mut self) -> Result<(), Error>[src]

pub fn detach(&mut self) -> Result<(), Error>[src]

pub fn status_wait_for(
    &mut self,
    retries: u8,
    wait_for_state: Option<State>
) -> Result<Status, Error>
[src]

pub fn set_address(&mut self, address: u32) -> Result<(), Error>[src]

pub fn reset_stm32(&mut self, address: u32) -> Result<(), Error>[src]

pub fn dfuse_get_commands(&mut self) -> Result<Vec<DfuseCommand>, Error>[src]

pub fn verify(
    &mut self,
    file: &mut File,
    address: u32,
    length: Option<u32>
) -> Result<(), Error>
[src]

Verify flash using file

pub fn erase_pages(&mut self, address: u32, length: u32) -> Result<(), Error>[src]

Erase pages from start address + length

pub fn mass_erase(&mut self) -> Result<(), Error>[src]

Do mass erase of flash

pub fn write_flash_from_slice(
    &mut self,
    address: u32,
    buf: &[u8]
) -> Result<usize, Error>
[src]

pub fn read_flash_to_slice(
    &mut self,
    address: u32,
    buf: &mut [u8]
) -> Result<usize, Error>
[src]

pub fn upload(
    &mut self,
    file: &mut File,
    address: u32,
    length: u32
) -> Result<(), Error>
[src]

Upload read flash and store it in file.

pub fn abort_to_idle(&mut self) -> Result<(), Error>[src]

pub fn download_raw(
    &mut self,
    file: &mut File,
    address: u32,
    length: Option<u32>
) -> Result<(), Error>
[src]

Download file to device using raw mode. If length is None it will read to file end.

pub fn descriptors(&mut self) -> &Option<UsbDevice>[src]

pub fn memory_layout(&self) -> &MemoryLayout[src]

pub fn usb(&mut self) -> &mut UsbCore[src]

Trait Implementations

impl Drop for Dfu[src]

impl From<(UsbFs, MemoryLayout, u32, u32)> for Dfu[src]

Auto Trait Implementations

impl RefUnwindSafe for Dfu

impl !Send for Dfu

impl !Sync for Dfu

impl Unpin for Dfu

impl UnwindSafe for Dfu

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<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.