Skip to main content

Class DigitalInterruptPort

Represents a port that is capable of reading digital input.

Assembly: Meadow.dll​
View Source​
Declaration
public class DigitalInterruptPort : DigitalInterruptPortBase, IDigitalInterruptPort, IDigitalInputPort, IDigitalPort, IPort<IDigitalChannelInfo>, IDisposable, IObservable<IChangeResult<DigitalState>>

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

Implements:
Meadow.Hardware.IDigitalInterruptPort, System.IDisposable, System.IObservable<Meadow.IChangeResult<Meadow.Hardware.DigitalState>>

Properties​

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; }

DebounceDuration​

Gets or Sets the interrupt debounce duration

View Source​
Declaration
public override TimeSpan DebounceDuration { get; set; }

GlitchDuration​

Gets or Sets the interrupt glitch filter duration

View Source​
Declaration
public override TimeSpan GlitchDuration { get; set; }

Methods​

From(IPin, IMeadowIOController, InterruptMode, ResistorMode, TimeSpan, TimeSpan)​

Creates a DigitalInterruptPort with the specified parameters

View Source​
Declaration
public static DigitalInterruptPort From(IPin pin, IMeadowIOController ioController, InterruptMode interruptMode, ResistorMode resistorMode, TimeSpan debounceDuration, TimeSpan glitchDuration)
Returns​

Meadow.Hardware.DigitalInterruptPort

Parameters​
TypeNameDescription
Meadow.Hardware.IPinpinThe IPin the port is on
Meadow.Hardware.IMeadowIOControllerioControllerThe IIoController used to control the IPin
Meadow.Hardware.InterruptModeinterruptModeThe interrupt mode for the port
Meadow.Hardware.ResistorModeresistorModeThe resistor mode for the port
System.TimeSpandebounceDurationThe debounce duration used for interrupts
System.TimeSpanglitchDurationThe glitch filter duration used for interrupts

Dispose(bool)​

Releases Port resources

View Source​
Declaration
protected override void Dispose(bool disposing)
Parameters​
TypeName
System.Booleandisposing

~DigitalInterruptPort()​

Finalizes the Port instance

View Source​
Declaration
protected ~DigitalInterruptPort()

Implements​