diff options
Diffstat (limited to 'examples/boot/bootloader/stm32/src/main.rs')
| -rw-r--r-- | examples/boot/bootloader/stm32/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
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 | } |
