Skip to content

Commit

Permalink
Allow other futures to run if the driver isn't actually async
Browse files Browse the repository at this point in the history
  • Loading branch information
bugadani committed Sep 27, 2023
1 parent aaa36a3 commit 38756b8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/board/ota/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use core::marker::PhantomData;

use crc::{Algorithm, Crc};
use embassy_futures::yield_now;
use macros::partition;
use norfs::medium::StorageMedium;
use norfs_driver::medium::MediumError;
Expand Down Expand Up @@ -246,6 +247,7 @@ where
Slot::Ota0 => self.ota0.erase(block).await?,
Slot::Ota1 => self.ota1.erase(block).await?,
}
yield_now().await;
}

Ok(())
Expand Down

0 comments on commit 38756b8

Please sign in to comment.