pub struct Address { /* private fields */ }
Expand description
16 or 24 bit program memory address
Used internally to provide correct page allignment and efficient storage. Use u16.into() or u32.into() to suit your target MCU’s address space size.
Although this struct is always 3 bytes in size, on an MCU with <65kB of flash memory, the highest byte is optimised away completely, taking it’s effective size down to only 2 bytes.
Implementations§
Source§impl Address
impl Address
Sourcepub fn into_page_aligned(self) -> Self
pub fn into_page_aligned(self) -> Self
Mask off the PCWORD part of the address, leaving only PCPAGE.
The resulting address is aligned to the start of the page.
Trait Implementations§
impl Copy for Address
impl Eq for Address
impl StructuralPartialEq for Address
Auto Trait Implementations§
impl Freeze for Address
impl RefUnwindSafe for Address
impl Send for Address
impl Sync for Address
impl Unpin for Address
impl UnwindSafe for Address
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