pub struct BackupMemory { /* private fields */ }Expand description
Struct used to initilize backup sram
Implementations§
Source§impl BackupMemory
impl BackupMemory
Sourcepub fn new(_backup_sram: Peri<'static, BKPSRAM>) -> Self
pub fn new(_backup_sram: Peri<'static, BKPSRAM>) -> Self
Setup battery backed sram
Returns slice to sram and whether the sram was retained
Sourcepub fn is_retained(&self) -> bool
pub fn is_retained(&self) -> bool
Returns true if the sram was retained across last reset
Sourcepub fn as_ptr(&self) -> *mut u8
pub fn as_ptr(&self) -> *mut u8
Get raw pointer to the battery backed memory
Note that this is not necesserily normal memory, so please do use volatile and aligned reads/writes unless you know what you are doing.
Auto Trait Implementations§
impl Freeze for BackupMemory
impl RefUnwindSafe for BackupMemory
impl Send for BackupMemory
impl Sync for BackupMemory
impl Unpin for BackupMemory
impl UnwindSafe for BackupMemory
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