diff options
| author | Rasmus Melchior Jacobsen <[email protected]> | 2023-04-04 22:44:21 +0200 |
|---|---|---|
| committer | Rasmus Melchior Jacobsen <[email protected]> | 2023-04-04 22:44:21 +0200 |
| commit | 84bfe9b8c93ea8634ce2192fb719034b5c13e5da (patch) | |
| tree | 55438e15f173ab3ce23f48ede11876e1a8aab23e /examples/boot/bootloader/stm32/src | |
| parent | a77ce1088d927266a23cbc971aed6facd3b7f918 (diff) | |
Align examples with bootloader changes
Diffstat (limited to 'examples/boot/bootloader/stm32/src')
| -rw-r--r-- | examples/boot/bootloader/stm32/src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/boot/bootloader/stm32/src/main.rs b/examples/boot/bootloader/stm32/src/main.rs index 4b17cd799..b8027d19a 100644 --- a/examples/boot/bootloader/stm32/src/main.rs +++ b/examples/boot/bootloader/stm32/src/main.rs | |||
| @@ -5,7 +5,7 @@ use cortex_m_rt::{entry, exception}; | |||
| 5 | #[cfg(feature = "defmt")] | 5 | #[cfg(feature = "defmt")] |
| 6 | use defmt_rtt as _; | 6 | use defmt_rtt as _; |
| 7 | use embassy_boot_stm32::*; | 7 | use embassy_boot_stm32::*; |
| 8 | use embassy_stm32::flash::{Flash, ERASE_SIZE, ERASE_VALUE, WRITE_SIZE}; | 8 | use embassy_stm32::flash::{Flash, ERASE_SIZE}; |
| 9 | 9 | ||
| 10 | #[entry] | 10 | #[entry] |
| 11 | fn main() -> ! { | 11 | fn main() -> ! { |
| @@ -19,9 +19,9 @@ fn main() -> ! { | |||
| 19 | } | 19 | } |
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | let mut bl: BootLoader<ERASE_SIZE, WRITE_SIZE> = BootLoader::default(); | 22 | let mut bl: BootLoader<ERASE_SIZE> = BootLoader::default(); |
| 23 | let flash = Flash::new(p.FLASH); | 23 | let flash = Flash::new(p.FLASH); |
| 24 | let mut flash = BootFlash::<_, ERASE_SIZE, ERASE_VALUE>::new(flash); | 24 | let mut flash = BootFlash::new(flash); |
| 25 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut flash)); | 25 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut flash)); |
| 26 | core::mem::drop(flash); | 26 | core::mem::drop(flash); |
| 27 | unsafe { bl.load(start) } | 27 | unsafe { bl.load(start) } |
