#[repr(u8)]pub enum Cmd {
Info = 0,
Erase = 1,
Write = 2,
Verify = 3,
Reset = 4,
}Expand description
Commands (host to device).
Variants§
Info = 0
Query device info (capacity, erase size, versions, mode).
Erase = 1
Erase flash at address. First erase transitions Idle to Updating.
Write = 2
Write data at address. Only valid in Updating state.
Verify = 3
Compute CRC16 over app region and transition to Validating.
Reset = 4
Reset the device. addr=0: boot app, addr=1: enter bootloader.
Implementations§
Trait Implementations§
impl Copy for Cmd
impl StructuralPartialEq for Cmd
Auto Trait Implementations§
impl Freeze for Cmd
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnsafeUnpin for Cmd
impl UnwindSafe for Cmd
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