#[repr(usize)]
pub enum Mcp23017 {
Show 16 variants
A0,
A1,
A2,
A3,
A4,
A5,
A6,
A7,
B0,
B1,
B2,
B3,
B4,
B5,
B6,
B7,
}
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
A1
A2
A3
A4
A5
A6
A7
B0
B1
B2
B3
B4
B5
B6
B7
Trait Implementations
sourceimpl Map for Mcp23017
impl Map for Mcp23017
sourcefn 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
). Read more
impl Copy for Mcp23017
impl Eq for Mcp23017
impl StructuralEq for Mcp23017
impl StructuralPartialEq for Mcp23017
Auto Trait Implementations
impl RefUnwindSafe for Mcp23017
impl Send for Mcp23017
impl Sync for Mcp23017
impl Unpin for Mcp23017
impl UnwindSafe for Mcp23017
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more