pub struct Flash128K;Expand description
A flash device with 128KiB of storage.
This storage type is divided into 32 4KiB sectors. Each sector must be erased before it can be written to. Failing to erase a sector will result in invalid data.
Implementations§
Source§impl Flash128K
impl Flash128K
Sourcepub fn reader<'a, 'b, Range>(&'a mut self, range: Range) -> Reader128K<'b>where
Range: RangeBounds<RangedUsize<0, 131071>>,
'a: 'b,
pub fn reader<'a, 'b, Range>(&'a mut self, range: Range) -> Reader128K<'b>where
Range: RangeBounds<RangedUsize<0, 131071>>,
'a: 'b,
Returns a reader over the given range.
Sourcepub fn erase_sectors<Range>(&mut self, sectors: Range) -> Result<(), Error>where
Range: RangeBounds<RangedU8<0, 31>>,
pub fn erase_sectors<Range>(&mut self, sectors: Range) -> Result<(), Error>where
Range: RangeBounds<RangedU8<0, 31>>,
Erases the specified sectors.
This should be called before attempting to write to these sectors. Memory that has already been written to cannot be written to again without first being erased.
Sourcepub fn writer<'a, 'b, Range>(&'a mut self, range: Range) -> Writer128K<'b>where
Range: RangeBounds<RangedUsize<0, 131071>>,
'a: 'b,
pub fn writer<'a, 'b, Range>(&'a mut self, range: Range) -> Writer128K<'b>where
Range: RangeBounds<RangedUsize<0, 131071>>,
'a: 'b,
Returns a writer over the given range.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Flash128K
impl RefUnwindSafe for Flash128K
impl Send for Flash128K
impl Sync for Flash128K
impl Unpin for Flash128K
impl UnwindSafe for Flash128K
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more