Class DigitalInputPort
Represents a port that is capable of reading digital input.
Assembly: Meadow.dll
View Source
public class DigitalInputPort : DigitalInputPortBase, IDigitalInputPort, IDigitalPort, IPort<IDigitalChannelInfo>, IDisposable
Inheritance: System.Object
-> Meadow.Hardware.PortBase<C> -> Meadow.Hardware.DigitalPortBase -> Meadow.Hardware.DigitalInputPortBase
Implements:
Meadow.Hardware.IDigitalInputPort, Meadow.Hardware.IDigitalPort, Meadow.Hardware.IPort<C>, System.IDisposable
Properties
IOController
Gets or sets the port's IOController
View Source
protected IMeadowIOController IOController { get; set; }
Resistor
Gets or Sets the internal resistor mode for the input
View Source
public override ResistorMode Resistor { get; set; }
State
Gets the current State of the input (True == high, False == low)
View Source
public override bool State { get; }
Methods
From(IPin, IMeadowIOController, ResistorMode)
Creates an instance of a DigitalInputPort
View Source
public static DigitalInputPort From(IPin pin, IMeadowIOController ioController, ResistorMode resistorMode)
Returns
Meadow.Hardware.DigitalInputPort
Parameters
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The IPin for the port |
Meadow.Hardware.IMeadowIOController | ioController | The port's IO Controller |
Meadow.Hardware.ResistorMode | resistorMode | The port's resistor mode |
Dispose(bool)
Releases the resources used by the port.
View Source
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | A boolean value indicating whether the port is being disposed. |
~DigitalInputPort()
Finalizes the DigitalInputPort instance
View Source
protected ~DigitalInputPort()