Struct tm4c123x_hal::eeprom::EepromAddress
source · pub struct EepromAddress { /* private fields */ }
Expand description
Struct used to pack the block and offset
Implementations§
source§impl EepromAddress
impl EepromAddress
sourcepub fn new(block: usize, offset: usize) -> EepromAddress
pub fn new(block: usize, offset: usize) -> EepromAddress
Creates a new EepromAddres with configured block and offset
sourcepub fn increment(
&mut self,
offset_size: usize,
block_size: usize
) -> &mut EepromAddress
pub fn increment( &mut self, offset_size: usize, block_size: usize ) -> &mut EepromAddress
Increments the offset by one, if that would cause an overflow, increment the block. If both the block and offset wrap, the output for the new block and offset will both be 0.
Trait Implementations§
source§impl Clone for EepromAddress
impl Clone for EepromAddress
source§fn clone(&self) -> EepromAddress
fn clone(&self) -> EepromAddress
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for EepromAddress
Auto Trait Implementations§
impl RefUnwindSafe for EepromAddress
impl Send for EepromAddress
impl Sync for EepromAddress
impl Unpin for EepromAddress
impl UnwindSafe for EepromAddress
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