diff options
Diffstat (limited to 'examples/boot/application/stm32h7/src/bin/a.rs')
| -rw-r--r-- | examples/boot/application/stm32h7/src/bin/a.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/boot/application/stm32h7/src/bin/a.rs b/examples/boot/application/stm32h7/src/bin/a.rs index 719176692..f239e3732 100644 --- a/examples/boot/application/stm32h7/src/bin/a.rs +++ b/examples/boot/application/stm32h7/src/bin/a.rs | |||
| @@ -34,8 +34,8 @@ async fn main(_spawner: Spawner) { | |||
| 34 | 34 | ||
| 35 | let config = FirmwareUpdaterConfig::from_linkerfile_blocking(&flash); | 35 | let config = FirmwareUpdaterConfig::from_linkerfile_blocking(&flash); |
| 36 | let mut magic = AlignedBuffer([0; WRITE_SIZE]); | 36 | let mut magic = AlignedBuffer([0; WRITE_SIZE]); |
| 37 | let mut updater = BlockingFirmwareUpdater::new(config); | 37 | let mut updater = BlockingFirmwareUpdater::new(config, &mut magic.0); |
| 38 | let writer = updater.prepare_update(magic.as_mut()).unwrap(); | 38 | let writer = updater.prepare_update().unwrap(); |
| 39 | button.wait_for_rising_edge().await; | 39 | button.wait_for_rising_edge().await; |
| 40 | let mut offset = 0; | 40 | let mut offset = 0; |
| 41 | let mut buf = AlignedBuffer([0; 4096]); | 41 | let mut buf = AlignedBuffer([0; 4096]); |
| @@ -44,7 +44,7 @@ async fn main(_spawner: Spawner) { | |||
| 44 | writer.write(offset, buf.as_ref()).unwrap(); | 44 | writer.write(offset, buf.as_ref()).unwrap(); |
| 45 | offset += chunk.len() as u32; | 45 | offset += chunk.len() as u32; |
| 46 | } | 46 | } |
| 47 | updater.mark_updated(magic.as_mut()).unwrap(); | 47 | updater.mark_updated().unwrap(); |
| 48 | led.set_low(); | 48 | led.set_low(); |
| 49 | cortex_m::peripheral::SCB::sys_reset(); | 49 | cortex_m::peripheral::SCB::sys_reset(); |
| 50 | } | 50 | } |
