diff options
| author | sander <[email protected]> | 2023-04-11 13:48:34 +0200 |
|---|---|---|
| committer | sander <[email protected]> | 2023-04-11 13:48:34 +0200 |
| commit | c309797488a4f33dfab659fdb2908eff76e16e40 (patch) | |
| tree | 2ee72042d9f06bf694fea8dd4cd2ba3e2e2cb10b /examples/boot/bootloader/rp | |
| parent | 6b2aaacf830d69fcb05f9611d3780f56b4ae82bc (diff) | |
| parent | b150b9506b2f0502065dc1b22eccc6448f611bff (diff) | |
merge embassy/master
Diffstat (limited to 'examples/boot/bootloader/rp')
| -rw-r--r-- | examples/boot/bootloader/rp/src/main.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/boot/bootloader/rp/src/main.rs b/examples/boot/bootloader/rp/src/main.rs index fb7f0522b..8129591fa 100644 --- a/examples/boot/bootloader/rp/src/main.rs +++ b/examples/boot/bootloader/rp/src/main.rs | |||
| @@ -5,7 +5,6 @@ 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_rp::*; | 7 | use embassy_boot_rp::*; |
| 8 | use embassy_rp::flash::ERASE_SIZE; | ||
| 9 | use embassy_time::Duration; | 8 | use embassy_time::Duration; |
| 10 | 9 | ||
| 11 | const FLASH_SIZE: usize = 2 * 1024 * 1024; | 10 | const FLASH_SIZE: usize = 2 * 1024 * 1024; |
| @@ -24,7 +23,7 @@ fn main() -> ! { | |||
| 24 | 23 | ||
| 25 | let mut bl: BootLoader = BootLoader::default(); | 24 | let mut bl: BootLoader = BootLoader::default(); |
| 26 | let flash = WatchdogFlash::<FLASH_SIZE>::start(p.FLASH, p.WATCHDOG, Duration::from_secs(8)); | 25 | let flash = WatchdogFlash::<FLASH_SIZE>::start(p.FLASH, p.WATCHDOG, Duration::from_secs(8)); |
| 27 | let mut flash = BootFlash::<_, ERASE_SIZE>::new(flash); | 26 | let mut flash = BootFlash::new(flash); |
| 28 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut flash)); | 27 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut flash)); |
| 29 | core::mem::drop(flash); | 28 | core::mem::drop(flash); |
| 30 | 29 | ||
