pub fn full_update(
    device_id: u64,
    file_path: std::path::PathBuf,
    message_sender: std::sync::mpsc::Sender<Message>,
) -> Result<()> {
    message_sender.send(Message::DeviceUpdateStarted)?;
    erase_device(device_id, &file_path, &message_sender)?;
    program_device(device_id, &file_path, &message_sender)?;
    verify_device(device_id, &file_path, &message_sender)?;
    message_sender.send(Message::DeviceUpdateFinished)?;

    Ok(())
}
/// Perform a full update on the device (erase, program, verify).
///
/// This function is executed in a separate thread and communicates with
/// the main thread via messages
Perform a full update on the device (erase, program, verify).
This function is executed in a separate thread and communicates with
the main thread via messages
Perform a full update on the device ( erase program verify ) . This function is executed in a separate thread and communicates with the main thread via messages
pub fn full_update(
    device_id: u64,
    file_path: std::path::PathBuf,
    message_sender: std::sync::mpsc::Sender<Message>,
) -> Result<()> {
    message_sender.send(Message::DeviceUpdateStarted)?;
    erase_device(device_id, &file_path, &message_sender)?;
    program_device(device_id, &file_path, &message_sender)?;
    verify_device(device_id, &file_path, &message_sender)?;
    message_sender.send(Message::DeviceUpdateFinished)?;
    Ok(())
}
pub fn full_update ( device_id : u64 , file_path : std :: path :: PathBuf , message_sender : std :: sync :: mpsc :: Sender < Message > , ) -> Result < ( ) > { message_sender . send ( Message :: DeviceUpdateStarted ) ? ; erase_device ( device_id , & file_path , & message_sender ) ? ; program_device ( device_id , & file_path , & message_sender ) ? ; verify_device ( device_id , & file_path , & message_sender ) ? ; message_sender . send ( Message :: DeviceUpdateFinished ) ? ; Ok ( ( ) ) }
Perform a full update on the device (erase, program, verify).
Perform a full update on the device ( erase program verify ) .
device_id
u64
file_path
std::path::PathBuf
message_sender
std::sync::mpsc::Sender<Message>