Skip to main content

Class Mcp23018

Represent an MCP23018 I2C port expander with open-drain outputs

Assembly: Mcp23xxx.dll
View Source
public class Mcp23018 : Mcp23x1x, IDigitalInputOutputController, IDigitalInputController, IDigitalOutputController, ISpiPeripheral, II2cPeripheral, IDigitalInterruptController, IPinController

Inheritance: System.Object -> Meadow.Foundation.ICs.IOExpanders.Mcp23xxx -> Meadow.Foundation.ICs.IOExpanders.Mcp23x1x

Implements:
Meadow.Hardware.IDigitalInputOutputController, Meadow.Hardware.IDigitalInputController, Meadow.Hardware.IDigitalOutputController, Meadow.Hardware.ISpiPeripheral, Meadow.Hardware.II2cPeripheral, Meadow.Hardware.IDigitalInterruptController, Meadow.Hardware.IPinController

Methods

CreateDigitalOutputPort(IPin, bool)

Creates a new DigitalOutputPort using the specified pin and initial state

View Source
public IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState = false)
Returns

Meadow.Hardware.IDigitalOutputPort: IDigitalOutputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin number to create the port on
System.BooleaninitialStateWhether the pin is initially high or low

CreateDigitalOutputPort(IPin, bool, OutputType)

Creates a new DigitalOutputPort using the specified pin and initial state

View Source
public override IDigitalOutputPort CreateDigitalOutputPort(IPin pin, bool initialState = false, OutputType outputType = OutputType.OpenDrain)
Returns

Meadow.Hardware.IDigitalOutputPort: IDigitalOutputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin number to create the port on
System.BooleaninitialStateWhether the pin is initially high or low
Meadow.Hardware.OutputTypeoutputTypeThe output type

Implements

  • Meadow.Hardware.IDigitalInputOutputController
  • Meadow.Hardware.IDigitalInputController
  • Meadow.Hardware.IDigitalOutputController
  • Meadow.Hardware.ISpiPeripheral
  • Meadow.Hardware.II2cPeripheral
  • Meadow.Hardware.IDigitalInterruptController
  • Meadow.Hardware.IPinController