diff options
| author | Rasmus Melchior Jacobsen <[email protected]> | 2023-05-30 14:13:53 +0200 |
|---|---|---|
| committer | Rasmus Melchior Jacobsen <[email protected]> | 2023-05-30 14:15:52 +0200 |
| commit | c22d2b5b5bbc5e3c7d3a039e90b50d39809a10f2 (patch) | |
| tree | 5add01b4a3fc096bb70773fc4455e20ee63e6276 | |
| parent | b703db4c09d1d4f0c4296a7fd7b808d96f29e1a2 (diff) | |
Remove unused use's
| -rw-r--r-- | embassy-boot/boot/src/firmware_updater/asynch.rs | 8 | ||||
| -rw-r--r-- | embassy-boot/boot/src/firmware_updater/blocking.rs | 12 |
2 files changed, 10 insertions, 10 deletions
diff --git a/embassy-boot/boot/src/firmware_updater/asynch.rs b/embassy-boot/boot/src/firmware_updater/asynch.rs index d0780bdf1..0b3f88313 100644 --- a/embassy-boot/boot/src/firmware_updater/asynch.rs +++ b/embassy-boot/boot/src/firmware_updater/asynch.rs | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | use digest::Digest; | 1 | use digest::Digest; |
| 2 | #[cfg(target_os = "none")] | ||
| 2 | use embassy_embedded_hal::flash::partition::Partition; | 3 | use embassy_embedded_hal::flash::partition::Partition; |
| 4 | #[cfg(target_os = "none")] | ||
| 3 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | 5 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; |
| 4 | use embedded_storage_async::nor_flash::NorFlash; | 6 | use embedded_storage_async::nor_flash::NorFlash; |
| 5 | 7 | ||
| @@ -13,14 +15,12 @@ pub struct FirmwareUpdater<DFU: NorFlash, STATE: NorFlash> { | |||
| 13 | state: STATE, | 15 | state: STATE, |
| 14 | } | 16 | } |
| 15 | 17 | ||
| 18 | #[cfg(target_os = "none")] | ||
| 16 | impl<'a, FLASH: NorFlash> | 19 | impl<'a, FLASH: NorFlash> |
| 17 | FirmwareUpdaterConfig<Partition<'a, NoopRawMutex, FLASH>, Partition<'a, NoopRawMutex, FLASH>> | 20 | FirmwareUpdaterConfig<Partition<'a, NoopRawMutex, FLASH>, Partition<'a, NoopRawMutex, FLASH>> |
| 18 | { | 21 | { |
| 19 | /// Create a firmware updater config from the flash and address symbols defined in the linkerfile | 22 | /// Create a firmware updater config from the flash and address symbols defined in the linkerfile |
| 20 | #[cfg(target_os = "none")] | 23 | pub fn from_linkerfile(flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, FLASH>) -> Self { |
| 21 | pub fn from_linkerfile(flash: &'a Mutex<NoopRawMutex, FLASH>) -> Self { | ||
| 22 | use embassy_sync::mutex::Mutex; | ||
| 23 | |||
| 24 | extern "C" { | 24 | extern "C" { |
| 25 | static __bootloader_state_start: u32; | 25 | static __bootloader_state_start: u32; |
| 26 | static __bootloader_state_end: u32; | 26 | static __bootloader_state_end: u32; |
diff --git a/embassy-boot/boot/src/firmware_updater/blocking.rs b/embassy-boot/boot/src/firmware_updater/blocking.rs index c44126149..551150c4f 100644 --- a/embassy-boot/boot/src/firmware_updater/blocking.rs +++ b/embassy-boot/boot/src/firmware_updater/blocking.rs | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | use digest::Digest; | 1 | use digest::Digest; |
| 2 | #[cfg(target_os = "none")] | ||
| 2 | use embassy_embedded_hal::flash::partition::BlockingPartition; | 3 | use embassy_embedded_hal::flash::partition::BlockingPartition; |
| 4 | #[cfg(target_os = "none")] | ||
| 3 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; | 5 | use embassy_sync::blocking_mutex::raw::NoopRawMutex; |
| 4 | use embedded_storage::nor_flash::NorFlash; | 6 | use embedded_storage::nor_flash::NorFlash; |
| 5 | 7 | ||
| @@ -13,16 +15,14 @@ pub struct BlockingFirmwareUpdater<DFU: NorFlash, STATE: NorFlash> { | |||
| 13 | state: STATE, | 15 | state: STATE, |
| 14 | } | 16 | } |
| 15 | 17 | ||
| 18 | #[cfg(target_os = "none")] | ||
| 16 | impl<'a, FLASH: NorFlash> | 19 | impl<'a, FLASH: NorFlash> |
| 17 | FirmwareUpdaterConfig<BlockingPartition<'a, NoopRawMutex, FLASH>, BlockingPartition<'a, NoopRawMutex, FLASH>> | 20 | FirmwareUpdaterConfig<BlockingPartition<'a, NoopRawMutex, FLASH>, BlockingPartition<'a, NoopRawMutex, FLASH>> |
| 18 | { | 21 | { |
| 19 | /// Create a firmware updater config from the flash and address symbols defined in the linkerfile | 22 | /// Create a firmware updater config from the flash and address symbols defined in the linkerfile |
| 20 | #[cfg(target_os = "none")] | 23 | pub fn from_linkerfile_blocking( |
| 21 | pub fn from_linkerfile_blocking(flash: &'a Mutex<NoopRawMutex, RefCell<FLASH>>) -> Self { | 24 | flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<FLASH>>, |
| 22 | use core::cell::RefCell; | 25 | ) -> Self { |
| 23 | |||
| 24 | use embassy_sync::blocking_mutex::Mutex; | ||
| 25 | |||
| 26 | extern "C" { | 26 | extern "C" { |
| 27 | static __bootloader_state_start: u32; | 27 | static __bootloader_state_start: u32; |
| 28 | static __bootloader_state_end: u32; | 28 | static __bootloader_state_end: u32; |
