#[repr(C)]pub struct Address(pub [u8; 3]);
Expand description
Represents the address field of the Argument.
The field is a 17-bit field split into two sub-fields:
[0:8]
: offset address in the specified page[9:16]
: page number
Tuple Fields§
§0: [u8; 3]
Implementations§
Source§impl Address
impl Address
Sourcepub const fn page_number(&self) -> u8
pub const fn page_number(&self) -> u8
Gets the offset address in the page specified by page_number
.
Sourcepub fn set_page_number(&mut self, val: u8)
pub fn set_page_number(&mut self, val: u8)
Sets the offset address in the page specified by page_number
.
Sourcepub const fn offset_address(&self) -> u16
pub const fn offset_address(&self) -> u16
Gets the offset address in the page specified by offset_address
.
Sourcepub fn set_offset_address(&mut self, val: u16)
pub fn set_offset_address(&mut self, val: u16)
Sets the offset address in the page specified by offset_address
.
§Note
The valid address range is: 0x0 - 0x1ff
.
Sourcepub const fn try_from_bits(val: u32) -> Result<Self>
pub const fn try_from_bits(val: u32) -> Result<Self>
Sourcepub const fn try_from_bytes(val: &[u8]) -> Result<Self>
pub const fn try_from_bytes(val: &[u8]) -> Result<Self>
Attempts to convert a byte slice into an Argument.
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