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<'_>; }
Expand description

Represents a device that can be updated by a FirmwareUpdater.

Required Associated Types

The expected version type for this device.

The error type.

Future returned by status

Future returned by start

Future returned by write

Future returned by update

Future returned by synced

Required Associated Constants

The preferred block size to be passed in write.

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