Add Clone derive to flash Partition in embassy-embedded-hal

This commit is contained in:
Mathias 2024-07-18 11:14:24 +02:00
parent e54c753537
commit 20bf995c3b
2 changed files with 2 additions and 0 deletions

View File

@ -12,6 +12,7 @@ use super::Error;
/// There is no guarantee that muliple partitions on the same flash /// There is no guarantee that muliple partitions on the same flash
/// operate on mutually exclusive ranges - such a separation is up to /// operate on mutually exclusive ranges - such a separation is up to
/// the user to guarantee. /// the user to guarantee.
#[derive(Clone)]
pub struct Partition<'a, M: RawMutex, T: NorFlash> { pub struct Partition<'a, M: RawMutex, T: NorFlash> {
flash: &'a Mutex<M, T>, flash: &'a Mutex<M, T>,
offset: u32, offset: u32,

View File

@ -13,6 +13,7 @@ use super::Error;
/// There is no guarantee that muliple partitions on the same flash /// There is no guarantee that muliple partitions on the same flash
/// operate on mutually exclusive ranges - such a separation is up to /// operate on mutually exclusive ranges - such a separation is up to
/// the user to guarantee. /// the user to guarantee.
#[derive(Clone)]
pub struct BlockingPartition<'a, M: RawMutex, T: NorFlash> { pub struct BlockingPartition<'a, M: RawMutex, T: NorFlash> {
flash: &'a Mutex<M, RefCell<T>>, flash: &'a Mutex<M, RefCell<T>>,
offset: u32, offset: u32,