aboutsummaryrefslogtreecommitdiff
path: root/embassy-boot/stm32/src/lib.rs
diff options
context:
space:
mode:
authorUlf Lilleengen <[email protected]>2023-12-14 19:56:04 +0000
committerGitHub <[email protected]>2023-12-14 19:56:04 +0000
commit5ec2fbe3a2ce3234ed6477fe5923c3d2425b55a7 (patch)
tree94b50831f7e5d606643eba7e0c9c1e5c7bf1ec86 /embassy-boot/stm32/src/lib.rs
parent485765320aaef82adbd4865b25e7171fb8f4041a (diff)
parent33e8943e5b6e637b82f13c77bd88bb56d55ab515 (diff)
Merge pull request #2284 from Redrield/feature/embassy-usb-dfu
Add embassy-usb-dfu crate, with related modifications to embassy-boot
Diffstat (limited to 'embassy-boot/stm32/src/lib.rs')
-rw-r--r--embassy-boot/stm32/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/embassy-boot/stm32/src/lib.rs b/embassy-boot/stm32/src/lib.rs
index c418cb262..4b4091ac9 100644
--- a/embassy-boot/stm32/src/lib.rs
+++ b/embassy-boot/stm32/src/lib.rs
@@ -10,7 +10,10 @@ pub use embassy_boot::{
10use embedded_storage::nor_flash::NorFlash; 10use embedded_storage::nor_flash::NorFlash;
11 11
12/// A bootloader for STM32 devices. 12/// A bootloader for STM32 devices.
13pub struct BootLoader; 13pub struct BootLoader {
14 /// The reported state of the bootloader after preparing for boot
15 pub state: State,
16}
14 17
15impl BootLoader { 18impl BootLoader {
16 /// Inspect the bootloader state and perform actions required before booting, such as swapping firmware 19 /// Inspect the bootloader state and perform actions required before booting, such as swapping firmware
@@ -19,8 +22,8 @@ impl BootLoader {
19 ) -> Self { 22 ) -> Self {
20 let mut aligned_buf = AlignedBuffer([0; BUFFER_SIZE]); 23 let mut aligned_buf = AlignedBuffer([0; BUFFER_SIZE]);
21 let mut boot = embassy_boot::BootLoader::new(config); 24 let mut boot = embassy_boot::BootLoader::new(config);
22 boot.prepare_boot(aligned_buf.as_mut()).expect("Boot prepare error"); 25 let state = boot.prepare_boot(aligned_buf.as_mut()).expect("Boot prepare error");
23 Self 26 Self { state }
24 } 27 }
25 28
26 /// Boots the application. 29 /// Boots the application.