Class Mcp23009
Represent an MCP23009 I2C port expander with open-drain outputs
Assembly: Mcp23xxx.dll
View Source
public class Mcp23009 : Mcp23x0x, IDigitalInputOutputController, IDigitalInputController, IDigitalOutputController, ISpiPeripheral, II2cPeripheral, IDigitalInterruptController, IPinController
Inheritance: System.Object
-> Meadow.Foundation.ICs.IOExpanders.Mcp23xxx -> Meadow.Foundation.ICs.IOExpanders.Mcp23x0x
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
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin number to create the port on |
System.Boolean | initialState | Whether 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
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The pin number to create the port on |
System.Boolean | initialState | Whether the pin is initially high or low |
Meadow.Hardware.OutputType | outputType | The output type |
Implements
Meadow.Hardware.IDigitalInputOutputController
Meadow.Hardware.IDigitalInputController
Meadow.Hardware.IDigitalOutputController
Meadow.Hardware.ISpiPeripheral
Meadow.Hardware.II2cPeripheral
Meadow.Hardware.IDigitalInterruptController
Meadow.Hardware.IPinController