Skip to main content

Class DigitalInputPort

Represents a port that is capable of reading digital input.

Assembly: Meadow.dll
View Source
Declaration
public class DigitalInputPort : DigitalInputPortBase, IDigitalInputPort, IDigitalPort, IPort<IDigitalChannelInfo>, IDisposable

Inheritance: System.Object -> Meadow.Hardware.PortBase<C>

Implements:
Meadow.Hardware.IDigitalInputPort, System.IDisposable

Properties

IOController

Gets or sets the port's IOController

View Source
Declaration
protected IMeadowIOController IOController { get; set; }

Resistor

Gets or Sets the internal resistor mode for the input

View Source
Declaration
public override ResistorMode Resistor { get; set; }

State

Gets the current State of the input (True == high, False == low)

View Source
Declaration
public override bool State { get; }

Methods

From(IPin, IMeadowIOController, ResistorMode)

Creates an instance of a DigitalInputPort

View Source
Declaration
public static DigitalInputPort From(IPin pin, IMeadowIOController ioController, ResistorMode resistorMode)
Returns

Meadow.Hardware.DigitalInputPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe IPin for the port
Meadow.Hardware.IMeadowIOControllerioControllerThe port's IO Controller
Meadow.Hardware.ResistorModeresistorModeThe port's resistor mode

Dispose(bool)

Releases the resources used by the port.

View Source
Declaration
protected override void Dispose(bool disposing)
Parameters
TypeNameDescription
System.BooleandisposingA boolean value indicating whether the port is being disposed.

~DigitalInputPort()

Finalizes the DigitalInputPort instance

View Source
Declaration
protected ~DigitalInputPort()

Implements