diff options
| author | Badr Bouslikhin <[email protected]> | 2024-02-07 11:32:13 +0100 |
|---|---|---|
| committer | Badr Bouslikhin <[email protected]> | 2024-02-07 11:32:13 +0100 |
| commit | af2b4df833902fa8d42cb133c52733fe0b848bc7 (patch) | |
| tree | 1f2cc5d98362fe12edd3a23cb0ff2bb258cbbfd9 /embassy-boot | |
| parent | c267cb9ab764176bc8514535f4db8ac2331e30ce (diff) | |
refactor(boot): change generics name to match existing convention
Diffstat (limited to 'embassy-boot')
| -rw-r--r-- | embassy-boot/src/boot_loader.rs | 14 | ||||
| -rw-r--r-- | embassy-boot/src/firmware_updater/asynch.rs | 8 | ||||
| -rw-r--r-- | embassy-boot/src/firmware_updater/blocking.rs | 11 |
3 files changed, 15 insertions, 18 deletions
diff --git a/embassy-boot/src/boot_loader.rs b/embassy-boot/src/boot_loader.rs index 54ae8a34b..c433ce439 100644 --- a/embassy-boot/src/boot_loader.rs +++ b/embassy-boot/src/boot_loader.rs | |||
| @@ -49,19 +49,19 @@ pub struct BootLoaderConfig<ACTIVE, DFU, STATE> { | |||
| 49 | pub state: STATE, | 49 | pub state: STATE, |
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | impl<'a, ActiveFlash: NorFlash, DFUFlash: NorFlash, StateFlash: NorFlash> | 52 | impl<'a, ACTIVE: NorFlash, DFU: NorFlash, STATE: NorFlash> |
| 53 | BootLoaderConfig< | 53 | BootLoaderConfig< |
| 54 | BlockingPartition<'a, NoopRawMutex, ActiveFlash>, | 54 | BlockingPartition<'a, NoopRawMutex, ACTIVE>, |
| 55 | BlockingPartition<'a, NoopRawMutex, DFUFlash>, | 55 | BlockingPartition<'a, NoopRawMutex, DFU>, |
| 56 | BlockingPartition<'a, NoopRawMutex, StateFlash>, | 56 | BlockingPartition<'a, NoopRawMutex, STATE>, |
| 57 | > | 57 | > |
| 58 | { | 58 | { |
| 59 | /// Create a bootloader config from the flash and address symbols defined in the linkerfile | 59 | /// Create a bootloader config from the flash and address symbols defined in the linkerfile |
| 60 | // #[cfg(target_os = "none")] | 60 | // #[cfg(target_os = "none")] |
| 61 | pub fn from_linkerfile_blocking( | 61 | pub fn from_linkerfile_blocking( |
| 62 | active_flash: &'a Mutex<NoopRawMutex, RefCell<ActiveFlash>>, | 62 | active_flash: &'a Mutex<NoopRawMutex, RefCell<ACTIVE>>, |
| 63 | dfu_flash: &'a Mutex<NoopRawMutex, RefCell<DFUFlash>>, | 63 | dfu_flash: &'a Mutex<NoopRawMutex, RefCell<DFU>>, |
| 64 | state_flash: &'a Mutex<NoopRawMutex, RefCell<StateFlash>>, | 64 | state_flash: &'a Mutex<NoopRawMutex, RefCell<STATE>>, |
| 65 | ) -> Self { | 65 | ) -> Self { |
| 66 | extern "C" { | 66 | extern "C" { |
| 67 | static __bootloader_state_start: u32; | 67 | static __bootloader_state_start: u32; |
diff --git a/embassy-boot/src/firmware_updater/asynch.rs b/embassy-boot/src/firmware_updater/asynch.rs index 5634b48d4..668f16f16 100644 --- a/embassy-boot/src/firmware_updater/asynch.rs +++ b/embassy-boot/src/firmware_updater/asynch.rs | |||
| @@ -16,13 +16,13 @@ pub struct FirmwareUpdater<'d, DFU: NorFlash, STATE: NorFlash> { | |||
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | #[cfg(target_os = "none")] | 18 | #[cfg(target_os = "none")] |
| 19 | impl<'a, DFUFlash: NorFlash, StateFlash: NorFlash> | 19 | impl<'a, DFU: NorFlash, STATE: NorFlash> |
| 20 | FirmwareUpdaterConfig<Partition<'a, NoopRawMutex, DFUFlash>, Partition<'a, NoopRawMutex, StateFlash>> | 20 | FirmwareUpdaterConfig<Partition<'a, NoopRawMutex, DFU>, Partition<'a, NoopRawMutex, STATE>> |
| 21 | { | 21 | { |
| 22 | /// 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 |
| 23 | pub fn from_linkerfile( | 23 | pub fn from_linkerfile( |
| 24 | dfu_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, DFUFlash>, | 24 | dfu_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, DFU>, |
| 25 | state_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, StateFlash>, | 25 | state_flash: &'a embassy_sync::mutex::Mutex<NoopRawMutex, STATE>, |
| 26 | ) -> Self { | 26 | ) -> Self { |
| 27 | extern "C" { | 27 | extern "C" { |
| 28 | static __bootloader_state_start: u32; | 28 | static __bootloader_state_start: u32; |
diff --git a/embassy-boot/src/firmware_updater/blocking.rs b/embassy-boot/src/firmware_updater/blocking.rs index 3814b6c31..cf850fce3 100644 --- a/embassy-boot/src/firmware_updater/blocking.rs +++ b/embassy-boot/src/firmware_updater/blocking.rs | |||
| @@ -16,16 +16,13 @@ pub struct BlockingFirmwareUpdater<'d, DFU: NorFlash, STATE: NorFlash> { | |||
| 16 | } | 16 | } |
| 17 | 17 | ||
| 18 | #[cfg(target_os = "none")] | 18 | #[cfg(target_os = "none")] |
| 19 | impl<'a, DFUFlash: NorFlash, StateFlash: NorFlash> | 19 | impl<'a, DFU: NorFlash, STATE: NorFlash> |
| 20 | FirmwareUpdaterConfig< | 20 | FirmwareUpdaterConfig<BlockingPartition<'a, NoopRawMutex, DFU>, BlockingPartition<'a, NoopRawMutex, STATE>> |
| 21 | BlockingPartition<'a, NoopRawMutex, DFUFlash>, | ||
| 22 | BlockingPartition<'a, NoopRawMutex, StateFlash>, | ||
| 23 | > | ||
| 24 | { | 21 | { |
| 25 | /// 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 |
| 26 | pub fn from_linkerfile_blocking( | 23 | pub fn from_linkerfile_blocking( |
| 27 | dfu_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<DFUFlash>>, | 24 | dfu_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<DFU>>, |
| 28 | state_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<StateFlash>>, | 25 | state_flash: &'a embassy_sync::blocking_mutex::Mutex<NoopRawMutex, core::cell::RefCell<STATE>>, |
| 29 | ) -> Self { | 26 | ) -> Self { |
| 30 | extern "C" { | 27 | extern "C" { |
| 31 | static __bootloader_state_start: u32; | 28 | static __bootloader_state_start: u32; |
