Class Mcp23x0x
Represent an MCP23x0x I2C/SPI port expander
Assembly: Mcp23xxx.dll
View Source
Declaration
public abstract class Mcp23x0x : Mcp23xxx, IDigitalInputOutputController, IDigitalInputController, IDigitalOutputController, ISpiPeripheral, II2cPeripheral, IDigitalInterruptController, IPinController
Inheritance: System.Object
-> Meadow.Foundation.ICs.IOExpanders.Mcp23xxx
Derived:
Meadow.Foundation.ICs.IOExpanders.Mcp23008
Implements:
Meadow.Hardware.IDigitalInputOutputController
, Meadow.Hardware.IDigitalInputController
, Meadow.Hardware.IDigitalOutputController
, Meadow.Hardware.ISpiPeripheral
, Meadow.Hardware.II2cPeripheral
, Meadow.Hardware.IDigitalInterruptController
, Meadow.Hardware.IPinController
Properties
Pins
MCP23x0x pin definitions
View Source
Declaration
public Mcp23x0x.PinDefinitions Pins { get; }
NumberOfPins
The number of IO pins available on the device
View Source
Declaration
public override int NumberOfPins { get; }
Methods
IsValidPin(IPin)
Is the pin valid for this device instance
View Source
Declaration
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
Declaration
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