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
Type | Name | Description |
---|---|---|
Meadow.Hardware.IPin | pin | The IPin the port is on |
Meadow.Hardware.IMeadowIOController | ioController | The IIoController used to control the IPin |
Meadow.Hardware.InterruptMode | interruptMode | The interrupt mode for the port |
Meadow.Hardware.ResistorMode | resistorMode | The resistor mode for the port |
System.TimeSpan | debounceDuration | The debounce duration used for interrupts |
System.TimeSpan | glitchDuration | The glitch filter duration used for interrupts |
Dispose(bool)
Releases Port resources
View Source
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name |
---|---|
System.Boolean | disposing |
~DigitalInterruptPort()
Finalizes the Port instance
View Source
Declaration
protected ~DigitalInterruptPort()
Implements
- Meadow.Hardware.IDigitalInterruptPort
- Meadow.Hardware.IDigitalInputPort
- Meadow.Hardware.IDigitalPort
- Meadow.Hardware.IPort<C>
System.IDisposable
System.IObservable<Meadow.IChangeResult<Meadow.Hardware.DigitalState>>