diff options
| author | Dario Nieuwenhuis <[email protected]> | 2021-04-14 17:00:28 +0200 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2021-04-14 17:04:40 +0200 |
| commit | 5ee87cf25d5bda026644ffe50755f25ae92f20db (patch) | |
| tree | b9d91d5921d67cf60fabb47d83cb7aa5333e311d /embassy-traits/src | |
| parent | d336a4b38a3e5cef1337f39c657beab76b60640e (diff) | |
Remove Pin from Flash trait
Diffstat (limited to 'embassy-traits/src')
| -rw-r--r-- | embassy-traits/src/flash.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/embassy-traits/src/flash.rs b/embassy-traits/src/flash.rs index 3adaa3a0a..c9b14a390 100644 --- a/embassy-traits/src/flash.rs +++ b/embassy-traits/src/flash.rs | |||
| @@ -27,19 +27,18 @@ pub trait Flash { | |||
| 27 | /// | 27 | /// |
| 28 | /// address must be a multiple of self.read_size(). | 28 | /// address must be a multiple of self.read_size(). |
| 29 | /// buf.len() must be a multiple of self.read_size(). | 29 | /// buf.len() must be a multiple of self.read_size(). |
| 30 | fn read<'a>(self: Pin<&'a mut Self>, address: usize, buf: &'a mut [u8]) | 30 | fn read<'a>(&'a mut self, address: usize, buf: &'a mut [u8]) -> Self::ReadFuture<'a>; |
| 31 | -> Self::ReadFuture<'a>; | ||
| 32 | 31 | ||
| 33 | /// Writes data to the flash device. | 32 | /// Writes data to the flash device. |
| 34 | /// | 33 | /// |
| 35 | /// address must be a multiple of self.write_size(). | 34 | /// address must be a multiple of self.write_size(). |
| 36 | /// buf.len() must be a multiple of self.write_size(). | 35 | /// buf.len() must be a multiple of self.write_size(). |
| 37 | fn write<'a>(self: Pin<&'a mut Self>, address: usize, buf: &'a [u8]) -> Self::WriteFuture<'a>; | 36 | fn write<'a>(&'a mut self, address: usize, buf: &'a [u8]) -> Self::WriteFuture<'a>; |
| 38 | 37 | ||
| 39 | /// Erases a single page from the flash device. | 38 | /// Erases a single page from the flash device. |
| 40 | /// | 39 | /// |
| 41 | /// address must be a multiple of self.erase_size(). | 40 | /// address must be a multiple of self.erase_size(). |
| 42 | fn erase<'a>(self: Pin<&'a mut Self>, address: usize) -> Self::ErasePageFuture<'a>; | 41 | fn erase<'a>(&'a mut self, address: usize) -> Self::ErasePageFuture<'a>; |
| 43 | 42 | ||
| 44 | /// Returns the total size, in bytes. | 43 | /// Returns the total size, in bytes. |
| 45 | /// This is not guaranteed to be a power of 2. | 44 | /// This is not guaranteed to be a power of 2. |
