pub struct Port<T: PortValue>(pub u16, PhantomData<T>);
Expand description
An IO port that can read/write register values.
This class is generic and supports any type that implements PortValue
and can be converted into a 1, 2 or 4 byte integer.
Read-modify-update the ports value.
Performs copy-assignment from
source
.
Read more
Formats the value using the given formatter.
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.