Struct atsamd_hal::nvm::smart_eeprom::SmartEeprom   
source · [−]pub struct SmartEeprom<'a, T: SmartEepromState> { /* private fields */ }Expand description
Implementations
sourceimpl<'a, T: SmartEepromState> SmartEeprom<'a, T>
 
impl<'a, T: SmartEepromState> SmartEeprom<'a, T>
sourcepub unsafe fn get_slice<TP: SmartEepromPointableSize>(&self) -> &[TP]
 
pub unsafe fn get_slice<TP: SmartEepromPointableSize>(&self) -> &[TP]
Returns an immutable slice to SmartEEPROM mapped address space.
Underlying pointed type can be either
u8, u16 or u32.
Safety
NVMCTRL.SEESTAT.BUSY register must be 0 before memory access can be
performed.
sourcepub fn get<TP: SmartEepromPointableSize>(&self, offset: usize, buffer: &mut [TP])
 
pub fn get<TP: SmartEepromPointableSize>(&self, offset: usize, buffer: &mut [TP])
Retrieves data stored in SmartEEPROM at offset location and copies it
to buffer.
Note:
offset_in_bytes == sizeof::<TP>() * offset
sourcepub fn iter<TP: SmartEepromPointableSize>(&'a self) -> SmartEepromIter<'a, TP>ⓘNotable traits for SmartEepromIter<'a, TP>impl<'a, TP: SmartEepromPointableSize> Iterator for SmartEepromIter<'a, TP>    type Item = &'a TP;
 
pub fn iter<TP: SmartEepromPointableSize>(&'a self) -> SmartEepromIter<'a, TP>ⓘNotable traits for SmartEepromIter<'a, TP>impl<'a, TP: SmartEepromPointableSize> Iterator for SmartEepromIter<'a, TP>    type Item = &'a TP;
Returns an iterator over SmartEEPROM address space.
sourceimpl<'a> SmartEeprom<'a, Unlocked>
 
impl<'a> SmartEeprom<'a, Unlocked>
sourcepub unsafe fn get_mut_slice<TP: SmartEepromPointableSize>(
    &mut self
) -> &mut [TP]
 
pub unsafe fn get_mut_slice<TP: SmartEepromPointableSize>(
    &mut self
) -> &mut [TP]
Returns a mutable slice to SmartEEPROM mapped address space.
Underlying pointed type can be either
u8, u16 or u32.
Safety
NVMCTRL.SEESTAT.BUSY register must be 0 before memory access can be
performed.
sourcepub fn set<TP: SmartEepromPointableSize>(&mut self, offset: usize, buffer: &[TP])
 
pub fn set<TP: SmartEepromPointableSize>(&mut self, offset: usize, buffer: &[TP])
Copies data in a buffer to SmartEEPROM at offset location
Note:
offset_in_bytes == sizeof::<TP>() * offset
sourcepub fn iter_mut<TP: SmartEepromPointableSize>(
    &'a mut self
) -> SmartEepromIterMut<'a, TP>ⓘNotable traits for SmartEepromIterMut<'a, TP>impl<'a, TP: SmartEepromPointableSize> Iterator for SmartEepromIterMut<'a, TP>    type Item = &'a mut TP;
 
pub fn iter_mut<TP: SmartEepromPointableSize>(
    &'a mut self
) -> SmartEepromIterMut<'a, TP>ⓘNotable traits for SmartEepromIterMut<'a, TP>impl<'a, TP: SmartEepromPointableSize> Iterator for SmartEepromIterMut<'a, TP>    type Item = &'a mut TP;
Returns a mutable iterator over SmartEEPROM address space.
sourcepub fn lock(self) -> SmartEeprom<'a, Locked>
 
pub fn lock(self) -> SmartEeprom<'a, Locked>
Locks SmartEEPROM, allowing only to perform read operations
sourceimpl<'a> SmartEeprom<'a, Locked>
 
impl<'a> SmartEeprom<'a, Locked>
sourcepub fn unlock(self) -> SmartEeprom<'a, Unlocked>
 
pub fn unlock(self) -> SmartEeprom<'a, Unlocked>
Unlocks SmartEEPROM, allowing to perform both read and write operations