diff options
Diffstat (limited to 'embassy-boot')
| -rw-r--r-- | embassy-boot/rp/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-boot/rp/src/lib.rs b/embassy-boot/rp/src/lib.rs index 96bcf3bf7..989e7521b 100644 --- a/embassy-boot/rp/src/lib.rs +++ b/embassy-boot/rp/src/lib.rs | |||
| @@ -54,7 +54,7 @@ pub struct WatchdogFlash<'d, const SIZE: usize> { | |||
| 54 | impl<'d, const SIZE: usize> WatchdogFlash<'d, SIZE> { | 54 | impl<'d, const SIZE: usize> WatchdogFlash<'d, SIZE> { |
| 55 | /// Start a new watchdog with a given flash and watchdog peripheral and a timeout | 55 | /// Start a new watchdog with a given flash and watchdog peripheral and a timeout |
| 56 | pub fn start(flash: FLASH, watchdog: WATCHDOG, timeout: Duration) -> Self { | 56 | pub fn start(flash: FLASH, watchdog: WATCHDOG, timeout: Duration) -> Self { |
| 57 | let flash = Flash::<_, Blocking, SIZE>::new(flash); | 57 | let flash = Flash::<_, Blocking, SIZE>::new_blocking(flash); |
| 58 | let mut watchdog = Watchdog::new(watchdog); | 58 | let mut watchdog = Watchdog::new(watchdog); |
| 59 | watchdog.start(timeout); | 59 | watchdog.start(timeout); |
| 60 | Self { flash, watchdog } | 60 | Self { flash, watchdog } |
| @@ -71,11 +71,11 @@ impl<'d, const SIZE: usize> NorFlash for WatchdogFlash<'d, SIZE> { | |||
| 71 | 71 | ||
| 72 | fn erase(&mut self, from: u32, to: u32) -> Result<(), Self::Error> { | 72 | fn erase(&mut self, from: u32, to: u32) -> Result<(), Self::Error> { |
| 73 | self.watchdog.feed(); | 73 | self.watchdog.feed(); |
| 74 | self.flash.erase(from, to) | 74 | self.flash.blocking_erase(from, to) |
| 75 | } | 75 | } |
| 76 | fn write(&mut self, offset: u32, data: &[u8]) -> Result<(), Self::Error> { | 76 | fn write(&mut self, offset: u32, data: &[u8]) -> Result<(), Self::Error> { |
| 77 | self.watchdog.feed(); | 77 | self.watchdog.feed(); |
| 78 | self.flash.write(offset, data) | 78 | self.flash.blocking_write(offset, data) |
| 79 | } | 79 | } |
| 80 | } | 80 | } |
| 81 | 81 | ||
| @@ -83,7 +83,7 @@ impl<'d, const SIZE: usize> ReadNorFlash for WatchdogFlash<'d, SIZE> { | |||
| 83 | const READ_SIZE: usize = <Flash<'d, FLASH, Blocking, SIZE> as ReadNorFlash>::READ_SIZE; | 83 | const READ_SIZE: usize = <Flash<'d, FLASH, Blocking, SIZE> as ReadNorFlash>::READ_SIZE; |
| 84 | fn read(&mut self, offset: u32, data: &mut [u8]) -> Result<(), Self::Error> { | 84 | fn read(&mut self, offset: u32, data: &mut [u8]) -> Result<(), Self::Error> { |
| 85 | self.watchdog.feed(); | 85 | self.watchdog.feed(); |
| 86 | self.flash.read(offset, data) | 86 | self.flash.blocking_read(offset, data) |
| 87 | } | 87 | } |
| 88 | fn capacity(&self) -> usize { | 88 | fn capacity(&self) -> usize { |
| 89 | self.flash.capacity() | 89 | self.flash.capacity() |
