pub struct DfuSansIo { /* private fields */ }Expand description
Use this struct to create state machines to make operations on the device.
Implementations§
Source§impl DfuSansIo
impl DfuSansIo
Sourcepub fn new(descriptor: FunctionalDescriptor) -> Self
pub fn new(descriptor: FunctionalDescriptor) -> Self
Create an instance of DfuSansIo.
Sourcepub fn download<'a, Layout>(
&'a self,
protocol: &'a DfuProtocol<Layout>,
length: u32,
) -> Result<GetStatus<ClearStatus<GetStatus<Start<'a>>>>, Error>
pub fn download<'a, Layout>( &'a self, protocol: &'a DfuProtocol<Layout>, length: u32, ) -> Result<GetStatus<ClearStatus<GetStatus<Start<'a>>>>, Error>
Create a state machine to download the firmware into the device.
Sourcepub fn detach(&self) -> UsbWriteControl<[u8; 0]>
pub fn detach(&self) -> UsbWriteControl<[u8; 0]>
Send a Detach request to the device
Sourcepub fn set_address(&mut self, address: u32)
pub fn set_address(&mut self, address: u32)
Set the address onto which to download the firmware.
This address is only used if the device uses the DfuSe protocol.
Auto Trait Implementations§
impl Freeze for DfuSansIo
impl RefUnwindSafe for DfuSansIo
impl Send for DfuSansIo
impl Sync for DfuSansIo
impl Unpin for DfuSansIo
impl UnwindSafe for DfuSansIo
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more