aboutsummaryrefslogtreecommitdiff
path: root/embassy-boot/src/firmware_updater
diff options
context:
space:
mode:
Diffstat (limited to 'embassy-boot/src/firmware_updater')
-rw-r--r--embassy-boot/src/firmware_updater/asynch.rs4
-rw-r--r--embassy-boot/src/firmware_updater/blocking.rs6
2 files changed, 5 insertions, 5 deletions
diff --git a/embassy-boot/src/firmware_updater/asynch.rs b/embassy-boot/src/firmware_updater/asynch.rs
index 66e311e38..26d4d39bd 100644
--- a/embassy-boot/src/firmware_updater/asynch.rs
+++ b/embassy-boot/src/firmware_updater/asynch.rs
@@ -6,7 +6,7 @@ use embassy_sync::blocking_mutex::raw::NoopRawMutex;
6use embedded_storage_async::nor_flash::NorFlash; 6use embedded_storage_async::nor_flash::NorFlash;
7 7
8use super::FirmwareUpdaterConfig; 8use super::FirmwareUpdaterConfig;
9use crate::{FirmwareUpdaterError, State, BOOT_MAGIC, DFU_DETACH_MAGIC, STATE_ERASE_VALUE, SWAP_MAGIC}; 9use crate::{BOOT_MAGIC, DFU_DETACH_MAGIC, FirmwareUpdaterError, STATE_ERASE_VALUE, SWAP_MAGIC, State};
10 10
11/// FirmwareUpdater is an application API for interacting with the BootLoader without the ability to 11/// FirmwareUpdater is an application API for interacting with the BootLoader without the ability to
12/// 'mess up' the internal bootloader state 12/// 'mess up' the internal bootloader state
@@ -25,7 +25,7 @@ impl<'a, DFU: NorFlash, STATE: NorFlash>
25 dfu_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, DFU>, 25 dfu_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, DFU>,
26 state_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, STATE>, 26 state_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, STATE>,
27 ) -> Self { 27 ) -> Self {
28 extern "C" { 28 unsafe extern "C" {
29 static __bootloader_state_start: u32; 29 static __bootloader_state_start: u32;
30 static __bootloader_state_end: u32; 30 static __bootloader_state_end: u32;
31 static __bootloader_dfu_start: u32; 31 static __bootloader_dfu_start: u32;
diff --git a/embassy-boot/src/firmware_updater/blocking.rs b/embassy-boot/src/firmware_updater/blocking.rs
index 0fedac1ea..5554025fc 100644
--- a/embassy-boot/src/firmware_updater/blocking.rs
+++ b/embassy-boot/src/firmware_updater/blocking.rs
@@ -6,7 +6,7 @@ use embassy_sync::blocking_mutex::raw::NoopRawMutex;
6use embedded_storage::nor_flash::NorFlash; 6use embedded_storage::nor_flash::NorFlash;
7 7
8use super::FirmwareUpdaterConfig; 8use super::FirmwareUpdaterConfig;
9use crate::{FirmwareUpdaterError, State, BOOT_MAGIC, DFU_DETACH_MAGIC, STATE_ERASE_VALUE, SWAP_MAGIC}; 9use crate::{BOOT_MAGIC, DFU_DETACH_MAGIC, FirmwareUpdaterError, STATE_ERASE_VALUE, SWAP_MAGIC, State};
10 10
11/// Blocking FirmwareUpdater is an application API for interacting with the BootLoader without the ability to 11/// Blocking FirmwareUpdater is an application API for interacting with the BootLoader without the ability to
12/// 'mess up' the internal bootloader state 12/// 'mess up' the internal bootloader state
@@ -55,7 +55,7 @@ impl<'a, DFU: NorFlash, STATE: NorFlash>
55 dfu_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<DFU>>, 55 dfu_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<DFU>>,
56 state_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<STATE>>, 56 state_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<STATE>>,
57 ) -> Self { 57 ) -> Self {
58 extern "C" { 58 unsafe extern "C" {
59 static __bootloader_state_start: u32; 59 static __bootloader_state_start: u32;
60 static __bootloader_state_end: u32; 60 static __bootloader_state_end: u32;
61 static __bootloader_dfu_start: u32; 61 static __bootloader_dfu_start: u32;
@@ -399,8 +399,8 @@ mod tests {
399 use core::cell::RefCell; 399 use core::cell::RefCell;
400 400
401 use embassy_embedded_hal::flash::partition::BlockingPartition; 401 use embassy_embedded_hal::flash::partition::BlockingPartition;
402 use embassy_sync::blocking_mutex::raw::NoopRawMutex;
403 use embassy_sync::blocking_mutex::Mutex; 402 use embassy_sync::blocking_mutex::Mutex;
403 use embassy_sync::blocking_mutex::raw::NoopRawMutex;
404 use sha1::{Digest, Sha1}; 404 use sha1::{Digest, Sha1};
405 405
406 use super::*; 406 use super::*;