diff options
| author | Rasmus Melchior Jacobsen <[email protected]> | 2023-04-04 21:18:41 +0200 |
|---|---|---|
| committer | Rasmus Melchior Jacobsen <[email protected]> | 2023-04-04 21:18:41 +0200 |
| commit | 6c93309df490020f0ae4a515bf404dfd251b9b69 (patch) | |
| tree | c46b934de8813b4a757665bc9ccd89b3324d74b2 /embassy-boot/boot/src/mem_flash.rs | |
| parent | 25577e0eafd8a3d4ffaa4b8f17cb55399fd58038 (diff) | |
Remove the Flash trait
Diffstat (limited to 'embassy-boot/boot/src/mem_flash.rs')
| -rw-r--r-- | embassy-boot/boot/src/mem_flash.rs | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/embassy-boot/boot/src/mem_flash.rs b/embassy-boot/boot/src/mem_flash.rs index 2598bf4de..dd85405c8 100644 --- a/embassy-boot/boot/src/mem_flash.rs +++ b/embassy-boot/boot/src/mem_flash.rs | |||
| @@ -5,8 +5,6 @@ use core::ops::{Bound, Range, RangeBounds}; | |||
| 5 | use embedded_storage::nor_flash::{ErrorType, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash}; | 5 | use embedded_storage::nor_flash::{ErrorType, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash}; |
| 6 | use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash}; | 6 | use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash}; |
| 7 | 7 | ||
| 8 | use crate::Flash; | ||
| 9 | |||
| 10 | pub struct MemFlash<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> { | 8 | pub struct MemFlash<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> { |
| 11 | pub mem: [u8; SIZE], | 9 | pub mem: [u8; SIZE], |
| 12 | pub pending_write_successes: Option<usize>, | 10 | pub pending_write_successes: Option<usize>, |
| @@ -44,12 +42,6 @@ impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> Defaul | |||
| 44 | } | 42 | } |
| 45 | } | 43 | } |
| 46 | 44 | ||
| 47 | impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> Flash | ||
| 48 | for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE> | ||
| 49 | { | ||
| 50 | const ERASE_VALUE: u8 = 0xFF; | ||
| 51 | } | ||
| 52 | |||
| 53 | impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> ErrorType | 45 | impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> ErrorType |
| 54 | for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE> | 46 | for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE> |
| 55 | { | 47 | { |
