diff options
| author | Mathias <[email protected]> | 2024-07-18 11:14:24 +0200 |
|---|---|---|
| committer | Mathias <[email protected]> | 2024-07-18 11:15:18 +0200 |
| commit | 20bf995c3be1eb5d0c156910ba219d10abdba20c (patch) | |
| tree | 045e41d8bc5862581306e5fd3ad8d3bce6c6a0de /embassy-embedded-hal/src | |
| parent | e54c753537b4b12c3d2fd03ad8e8ba9eaaded06e (diff) | |
Add Clone derive to flash Partition in embassy-embedded-hal
Diffstat (limited to 'embassy-embedded-hal/src')
| -rw-r--r-- | embassy-embedded-hal/src/flash/partition/asynch.rs | 1 | ||||
| -rw-r--r-- | embassy-embedded-hal/src/flash/partition/blocking.rs | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/embassy-embedded-hal/src/flash/partition/asynch.rs b/embassy-embedded-hal/src/flash/partition/asynch.rs index 5920436dd..576e7e5b6 100644 --- a/embassy-embedded-hal/src/flash/partition/asynch.rs +++ b/embassy-embedded-hal/src/flash/partition/asynch.rs | |||
| @@ -12,6 +12,7 @@ use super::Error; | |||
| 12 | /// There is no guarantee that muliple partitions on the same flash | 12 | /// There is no guarantee that muliple partitions on the same flash |
| 13 | /// operate on mutually exclusive ranges - such a separation is up to | 13 | /// operate on mutually exclusive ranges - such a separation is up to |
| 14 | /// the user to guarantee. | 14 | /// the user to guarantee. |
| 15 | #[derive(Clone)] | ||
| 15 | pub struct Partition<'a, M: RawMutex, T: NorFlash> { | 16 | pub struct Partition<'a, M: RawMutex, T: NorFlash> { |
| 16 | flash: &'a Mutex<M, T>, | 17 | flash: &'a Mutex<M, T>, |
| 17 | offset: u32, | 18 | offset: u32, |
diff --git a/embassy-embedded-hal/src/flash/partition/blocking.rs b/embassy-embedded-hal/src/flash/partition/blocking.rs index 2ddbe3de0..478f39246 100644 --- a/embassy-embedded-hal/src/flash/partition/blocking.rs +++ b/embassy-embedded-hal/src/flash/partition/blocking.rs | |||
| @@ -13,6 +13,7 @@ use super::Error; | |||
| 13 | /// There is no guarantee that muliple partitions on the same flash | 13 | /// There is no guarantee that muliple partitions on the same flash |
| 14 | /// operate on mutually exclusive ranges - such a separation is up to | 14 | /// operate on mutually exclusive ranges - such a separation is up to |
| 15 | /// the user to guarantee. | 15 | /// the user to guarantee. |
| 16 | #[derive(Clone)] | ||
| 16 | pub struct BlockingPartition<'a, M: RawMutex, T: NorFlash> { | 17 | pub struct BlockingPartition<'a, M: RawMutex, T: NorFlash> { |
| 17 | flash: &'a Mutex<M, RefCell<T>>, | 18 | flash: &'a Mutex<M, RefCell<T>>, |
| 18 | offset: u32, | 19 | offset: u32, |
