#[repr(u8)]pub enum RegisterAddress {
Show 22 variants
IODIRA = 0,
IODIRB = 1,
IPOLA = 2,
IPOLB = 3,
GPINTENA = 4,
GPINTENB = 5,
DEFVALA = 6,
DEFVALB = 7,
INTCONA = 8,
INTCONB = 9,
IOCON = 10,
IOCON2 = 11,
GPPUA = 12,
GPPUB = 13,
INTFA = 14,
INTFB = 15,
INTCAPA = 16,
INTCAPB = 17,
GPIOA = 18,
GPIOB = 19,
OLATA = 20,
OLATB = 21,
}Expand description
The register addresses within the device.
Note that this follows the “interleaved” format for the register addresses so that
the IOCON::BANK bit of IOCON register must be set
to 0 (IOCON::BANK_OFF).
Variants§
IODIRA = 0
I/O direction A
IODIRB = 1
I/O direction B
IPOLA = 2
I/O polarity A
IPOLB = 3
I/O polarity B
GPINTENA = 4
interrupt enable A
GPINTENB = 5
interrupt enable B
DEFVALA = 6
register default value A (interrupts)
DEFVALB = 7
register default value B (interrupts)
INTCONA = 8
interrupt control A
INTCONB = 9
interrupt control B
IOCON = 10
I/O config (also at 0xB)
IOCON2 = 11
I/O config (duplicate)
GPPUA = 12
port A pull-ups
GPPUB = 13
port B pull-ups
INTFA = 14
interrupt flag A (where the interrupt came from)
INTFB = 15
interrupt flag B
INTCAPA = 16
interrupt capture A (value at interrupt is saved here)
INTCAPB = 17
interrupt capture B
GPIOA = 18
port A
GPIOB = 19
port B
OLATA = 20
output latch A
OLATB = 21
output latch B
Trait Implementations§
Source§impl Clone for RegisterAddress
impl Clone for RegisterAddress
Source§fn clone(&self) -> RegisterAddress
fn clone(&self) -> RegisterAddress
Returns a duplicate 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 moreSource§impl PartialEq for RegisterAddress
impl PartialEq for RegisterAddress
impl Copy for RegisterAddress
impl Eq for RegisterAddress
impl StructuralPartialEq for RegisterAddress
Auto Trait Implementations§
impl Freeze for RegisterAddress
impl RefUnwindSafe for RegisterAddress
impl Send for RegisterAddress
impl Sync for RegisterAddress
impl Unpin for RegisterAddress
impl UnwindSafe for RegisterAddress
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