RegisterAddress

Enum RegisterAddress 

Source
#[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

Source§

fn clone(&self) -> RegisterAddress

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl PartialEq for RegisterAddress

Source§

fn eq(&self, other: &RegisterAddress) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for RegisterAddress

Source§

impl Eq for RegisterAddress

Source§

impl StructuralPartialEq for RegisterAddress

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.