aboutsummaryrefslogtreecommitdiff
path: root/examples/boot/bootloader
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2022-09-30 11:32:27 +0000
committerGitHub <[email protected]>2022-09-30 11:32:27 +0000
commitaabc02506bcbd762552660a0b45cda6e15787cab (patch)
tree253c93c3a496dd960bfea5a0b7ff950c8be52509 /examples/boot/bootloader
parent99284b830455dde9cd91091e2c1f4dda92936f51 (diff)
parenta7fdeac560b5e277afa80cd60f788a48df6069c9 (diff)
Merge #992
992: (embassy-stm32): remove flash lock/unlock public API from stm32 flash r=lulf a=MathiasKoch Instead, perform the unlocking and locking automatically on erase and write operations. This makes the `embedded-storage` abstraction actually useable in libraries, while still keeping the flash peripheral locked the majority of the time. Co-authored-by: Mathias <[email protected]>
Diffstat (limited to 'examples/boot/bootloader')
-rw-r--r--examples/boot/bootloader/stm32/src/main.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/boot/bootloader/stm32/src/main.rs b/examples/boot/bootloader/stm32/src/main.rs
index 294464d1c..4b17cd799 100644
--- a/examples/boot/bootloader/stm32/src/main.rs
+++ b/examples/boot/bootloader/stm32/src/main.rs
@@ -20,7 +20,7 @@ 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 flash = Flash::unlock(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::<_, ERASE_SIZE, ERASE_VALUE>::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);