diff options
Diffstat (limited to 'examples/boot/bootloader')
| -rw-r--r-- | examples/boot/bootloader/nrf/src/main.rs | 2 | ||||
| -rw-r--r-- | examples/boot/bootloader/stm32/src/main.rs | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/examples/boot/bootloader/nrf/src/main.rs b/examples/boot/bootloader/nrf/src/main.rs index 9031997c2..8266206b3 100644 --- a/examples/boot/bootloader/nrf/src/main.rs +++ b/examples/boot/bootloader/nrf/src/main.rs | |||
| @@ -21,7 +21,7 @@ fn main() -> ! { | |||
| 21 | 21 | ||
| 22 | let mut bl = BootLoader::default(); | 22 | let mut bl = BootLoader::default(); |
| 23 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut BootFlash::<_, 4096>::new( | 23 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut BootFlash::<_, 4096>::new( |
| 24 | &mut WatchdogFlash::start(Nvmc::new(p.NVMC), p.WDT, 5), | 24 | WatchdogFlash::start(Nvmc::new(p.NVMC), p.WDT, 5), |
| 25 | ))); | 25 | ))); |
| 26 | unsafe { bl.load(start) } | 26 | unsafe { bl.load(start) } |
| 27 | } | 27 | } |
diff --git a/examples/boot/bootloader/stm32/src/main.rs b/examples/boot/bootloader/stm32/src/main.rs index bb5d3e531..294464d1c 100644 --- a/examples/boot/bootloader/stm32/src/main.rs +++ b/examples/boot/bootloader/stm32/src/main.rs | |||
| @@ -20,10 +20,9 @@ fn main() -> ! { | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | let mut bl: BootLoader<ERASE_SIZE, WRITE_SIZE> = BootLoader::default(); | 22 | let mut bl: BootLoader<ERASE_SIZE, WRITE_SIZE> = BootLoader::default(); |
| 23 | let mut flash = Flash::unlock(p.FLASH); | 23 | let flash = Flash::unlock(p.FLASH); |
| 24 | let start = bl.prepare(&mut SingleFlashConfig::new( | 24 | let mut flash = BootFlash::<_, ERASE_SIZE, ERASE_VALUE>::new(flash); |
| 25 | &mut BootFlash::<_, ERASE_SIZE, ERASE_VALUE>::new(&mut flash), | 25 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut flash)); |
| 26 | )); | ||
| 27 | core::mem::drop(flash); | 26 | core::mem::drop(flash); |
| 28 | unsafe { bl.load(start) } | 27 | unsafe { bl.load(start) } |
| 29 | } | 28 | } |
