pub trait FirmwareDevice {
    type Version: FirmwareVersion;
    type Error;
    type StatusFuture<'m>: Future<Output = Result<FirmwareStatus<Self::Version>, Self::Error>> + 'm
    where
        Self: 'm
; type StartFuture<'m>: Future<Output = Result<(), Self::Error>> + 'm
    where
        Self: 'm
; type WriteFuture<'m>: Future<Output = Result<(), Self::Error>> + 'm
    where
        Self: 'm
; type UpdateFuture<'m>: Future<Output = Result<(), Self::Error>> + 'm
    where
        Self: 'm
; type SyncedFuture<'m>: Future<Output = Result<(), Self::Error>> + 'm
    where
        Self: 'm
; const MTU: usize; fn status(&mut self) -> Self::StatusFuture<'_>; fn start<'m>(&'m mut self, version: &'m [u8]) -> Self::StartFuture<'m>; fn write<'m>(
        &'m mut self,
        offset: u32,
        data: &'m [u8]
    ) -> Self::WriteFuture<'m>; fn update<'m>(
        &'m mut self,
        version: &'m [u8],
        checksum: &'m [u8]
    ) -> Self::UpdateFuture<'m>; fn synced(&mut self) -> Self::SyncedFuture<'_>; }

Required Associated Types

Future returned by write

Future returned by update

Future returned by synced

Required Associated Constants

Required Methods

Return the status of the currently running firmware.

Prepare for starting the firmware update process.

Write a block of firmware at the expected offset.

Finish the firmware write and mark device to be updated

Mark firmware as being in sync with the expected

Implementors