diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2023-05-26 08:21:57 +0000 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-05-26 08:21:57 +0000 |
| commit | 31b364b9b0a18a9ebb341747861441b11f621ea0 (patch) | |
| tree | 9b3409b9c19a41ca216cd88533a10d4ce4c984f5 /examples/boot/bootloader | |
| parent | 524a89cc722d2f01e1edcceb8ed116c5f2e12885 (diff) | |
| parent | 307f2365da9b24fac2a0c312106a5f9986c4b5ea (diff) | |
Merge #1480
1480: stm32: Async flash support for F4 r=rmja a=rmja
This PR depends on https://github.com/embassy-rs/embassy/pull/1478.
It adds async write/erase operations to the F4 series based on the work in https://github.com/embassy-rs/embassy/pull/870 but aligned to the new flash regions.
If one considers the entire `Flash` then nothing has changed other than the async operations have been added.
Co-authored-by: Rasmus Melchior Jacobsen <[email protected]>
Diffstat (limited to 'examples/boot/bootloader')
| -rw-r--r-- | examples/boot/bootloader/stm32/src/main.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/boot/bootloader/stm32/src/main.rs b/examples/boot/bootloader/stm32/src/main.rs index 49c21920b..f81fdbc5f 100644 --- a/examples/boot/bootloader/stm32/src/main.rs +++ b/examples/boot/bootloader/stm32/src/main.rs | |||
| @@ -20,8 +20,7 @@ fn main() -> ! { | |||
| 20 | */ | 20 | */ |
| 21 | 21 | ||
| 22 | let mut bl: BootLoader<2048> = BootLoader::default(); | 22 | let mut bl: BootLoader<2048> = BootLoader::default(); |
| 23 | let flash = Flash::new(p.FLASH); | 23 | let layout = Flash::new_blocking(p.FLASH).into_blocking_regions(); |
| 24 | let layout = flash.into_regions(); | ||
| 25 | let mut flash = BootFlash::new(layout.bank1_region); | 24 | let mut flash = BootFlash::new(layout.bank1_region); |
| 26 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut flash)); | 25 | let start = bl.prepare(&mut SingleFlashConfig::new(&mut flash)); |
| 27 | core::mem::drop(flash); | 26 | core::mem::drop(flash); |
