Remove the Flash trait

This commit is contained in:
Rasmus Melchior Jacobsen
2023-04-04 21:18:41 +02:00
parent 25577e0eaf
commit 6c93309df4
4 changed files with 32 additions and 57 deletions

View File

@ -5,8 +5,6 @@ use core::ops::{Bound, Range, RangeBounds};
use embedded_storage::nor_flash::{ErrorType, NorFlash, NorFlashError, NorFlashErrorKind, ReadNorFlash};
use embedded_storage_async::nor_flash::{NorFlash as AsyncNorFlash, ReadNorFlash as AsyncReadNorFlash};
use crate::Flash;
pub struct MemFlash<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> {
pub mem: [u8; SIZE],
pub pending_write_successes: Option<usize>,
@ -44,12 +42,6 @@ impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> Defaul
}
}
impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> Flash
for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE>
{
const ERASE_VALUE: u8 = 0xFF;
}
impl<const SIZE: usize, const ERASE_SIZE: usize, const WRITE_SIZE: usize> ErrorType
for MemFlash<SIZE, ERASE_SIZE, WRITE_SIZE>
{