Skip to main content

Class DigitalInterruptPort

Represents a port that is capable of reading digital input.

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

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

Implements:
Meadow.Hardware.IDigitalInterruptPort, Meadow.Hardware.IDigitalInputPort, Meadow.Hardware.IDigitalPort, Meadow.Hardware.IPort<C>, System.IDisposable, System.IObservable<Meadow.IChangeResult<Meadow.Hardware.DigitalState>>

Properties

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

DebounceDuration

Gets or Sets the interrupt debounce duration

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

GlitchDuration

Gets or Sets the interrupt glitch filter duration

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

Methods

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

Creates a DigitalInterruptPort with the specified parameters

View Source
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
protected override void Dispose(bool disposing)
Parameters
TypeName
System.Booleandisposing

~DigitalInterruptPort()

Finalizes the Port instance

View Source
protected ~DigitalInterruptPort()

Implements