mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-25 00:02:28 +00:00
make prepare_update async
This commit is contained in:
parent
b2a327a858
commit
6fa74b0c02
@ -700,8 +700,8 @@ impl FirmwareUpdater {
|
||||
///
|
||||
/// Using this instead of `write_firmware` allows for an optimized API in
|
||||
/// exchange for added complexity.
|
||||
pub fn prepare_update<F: NorFlash>(&mut self, flash: &mut F) -> Result<FirmwareWriter, F::Error> {
|
||||
flash.erase((self.dfu.from) as u32, (self.dfu.to) as u32)?;
|
||||
pub async fn prepare_update<F: AsyncNorFlash>(&mut self, flash: &mut F) -> Result<FirmwareWriter, F::Error> {
|
||||
flash.erase((self.dfu.from) as u32, (self.dfu.to) as u32).await?;
|
||||
|
||||
trace!("Erased from {} to {}", self.dfu.from, self.dfu.to);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user