Class Mcp23x1x
Wraps 16-bit MCP I/O expanders.
public abstract class Mcp23x1x : Mcp23xxx
- Inheritance
-
GpioDriverMcp23x1x
- Derived
- Inherited Members
Constructors
Mcp23x1x(BusAdapter, int, int, int, GpioController?, bool)
Constructs Mcp23x1x instance
protected Mcp23x1x(Mcp23xxx.BusAdapter device, int reset, int interruptA, int interruptB, GpioController? controller, bool shouldDispose = true)
Parameters
device
Mcp23xxx.BusAdapterI2C device used to communicate with the device
reset
intReset pin
interruptA
intInterrupt A pin
interruptB
intInterrupt B pin
controller
GpioControllerGpioController related with
reset
interruptA
andinterruptB
pinsshouldDispose
boolTrue to dispose the Gpio Controller
Properties
PinCount
The number of pins provided by the driver.
protected override int PinCount { get; }
Property Value
Methods
ReadByte(Register, Port)
Read a byte from the given register on the given port.
public byte ReadByte(Register register, Port port)
Parameters
Returns
ReadInterrupt(Port)
Reads the interrupt pin for the given port if configured.
public PinValue ReadInterrupt(Port port)
Parameters
port
Port
Returns
ReadUInt16(Register)
Read a ushort from the given register.
public ushort ReadUInt16(Register register)
Parameters
register
Register
Returns
WriteByte(Register, byte, Port)
Write a byte to the given register on the given port.
public void WriteByte(Register register, byte value, Port port)
Parameters
WriteUInt16(Register, ushort)
Write a ushort to the given register. Writes the value to both ports.
public void WriteUInt16(Register register, ushort value)