Skip to main content

Class Mcp23x0x

Represent an MCP23x0x I2C/SPI port expander

Assembly: Mcp23xxx.dll
View Source
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, Meadow.Foundation.ICs.IOExpanders.Mcp23009, Meadow.Foundation.ICs.IOExpanders.Mcp23s08, Meadow.Foundation.ICs.IOExpanders.Mcp23s09

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
public Mcp23x0x.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
TypeNameDescription
Meadow.Hardware.IPinpinThe 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
TypeNameDescription
System.StringpinNameThe 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