Class Mcp23x1x
Represent an MCP23x1x I2C port expander
Assembly: Mcp23xxx.dll
View Source
public abstract class Mcp23x1x : Mcp23xxx, IDigitalInputOutputController, IDigitalInputController, IDigitalOutputController, ISpiPeripheral, II2cPeripheral, IDigitalInterruptController, IPinController
Inheritance: System.Object
-> Meadow.Foundation.ICs.IOExpanders.Mcp23xxx
Derived:
Meadow.Foundation.ICs.IOExpanders.Mcp23017, Meadow.Foundation.ICs.IOExpanders.Mcp23018, Meadow.Foundation.ICs.IOExpanders.Mcp23s17, Meadow.Foundation.ICs.IOExpanders.Mcp23s18
Implements:
Meadow.Hardware.IDigitalInputOutputController
, Meadow.Hardware.IDigitalInputController
, Meadow.Hardware.IDigitalOutputController
, Meadow.Hardware.ISpiPeripheral
, Meadow.Hardware.II2cPeripheral
, Meadow.Hardware.IDigitalInterruptController
, Meadow.Hardware.IPinController
Properties
Pins
MCP23x17 pin definitions
View Source
public Mcp23x1x.PinDefinitions Pins { get; }
NumberOfPins
The number of IO pins available on the device
View Source
public override int NumberOfPins { get; }
Methods
IsValidPin(IPin)
Is the pin valid for this device instance
View Source
protected override bool IsValidPin(IPin pin)
Returns
System.Boolean
: True if pin is valid
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The IPin to validate |
GetPin(string)
Get pin reference by name
View Source
public override IPin GetPin(string pinName)
Returns
Meadow.Hardware.IPin
: IPin reference if found
Parameters
Type | Name | Description |
---|---|---|
System.String | pinName | The pin name as a string |
Implements
Meadow.Hardware.IDigitalInputOutputController
Meadow.Hardware.IDigitalInputController
Meadow.Hardware.IDigitalOutputController
Meadow.Hardware.ISpiPeripheral
Meadow.Hardware.II2cPeripheral
Meadow.Hardware.IDigitalInterruptController
Meadow.Hardware.IPinController