#[repr(usize)]pub enum Mcp23017 {
Show 16 variants
A0 = 0,
A1 = 1,
A2 = 2,
A3 = 3,
A4 = 4,
A5 = 5,
A6 = 6,
A7 = 7,
B0 = 8,
B1 = 9,
B2 = 10,
B3 = 11,
B4 = 12,
B5 = 13,
B6 = 14,
B7 = 15,
}
Expand description
MCP23017 register map.
Note: This operates the chip in IOCON.BANK=0
mode, i.e. even register addresses are bank 0.
This driver does not set IOCON.BANK
, but the factory default is 0
and this driver does
not change that value.
See the datasheet for more information on the device.
Variants§
A0 = 0
A1 = 1
A2 = 2
A3 = 3
A4 = 4
A5 = 5
A6 = 6
A7 = 7
B0 = 8
B1 = 9
B2 = 10
B3 = 11
B4 = 12
B5 = 13
B6 = 14
B7 = 15
Trait Implementations§
source§impl Map for Mcp23017
impl Map for Mcp23017
source§fn map(self, reg: Register) -> (u8, usize)
fn map(self, reg: Register) -> (u8, usize)
A way to map a named register (
Register
) and pin (from Pin
, depending on the variant)
to a register address and bit index. This may depend on the number of IO banks, the
way the banks are ordered in memory, and even the current configuration (IOCON.BANK
).source§impl PartialEq for Mcp23017
impl PartialEq for Mcp23017
impl Copy for Mcp23017
impl Eq for Mcp23017
impl StructuralPartialEq for Mcp23017
Auto Trait Implementations§
impl Freeze for Mcp23017
impl RefUnwindSafe for Mcp23017
impl Send for Mcp23017
impl Sync for Mcp23017
impl Unpin for Mcp23017
impl UnwindSafe for Mcp23017
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