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.
Mask off the PCWORD part of the address, leaving only PCPAGE.
The resulting address is aligned to the start of the page.
The word byte index within the page: technically PCWORD << 1
The extended byte of the address, usually written to RAMPZ on MCUs with extended addressing
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
This method tests for
self
and
other
values to be equal, and is used
by
==
.
Read more
This method tests for
!=
. The default implementation is almost always
sufficient, and should not be overridden without very good reason.
Read more
Immutably borrows from an owned value.
Read more
Mutably borrows from an owned value.
Read more
Returns the argument unchanged.
Calls U::from(self)
.
That is, this conversion is whatever the implementation of
From<T> for U
chooses to do.
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.