Skip to main content

Interface IDigitalInterruptController

Contract for IO devices that are capable of creating IDigitalInterruptPort instances.

Assembly: Meadow.Contracts.dll
View Source
public interface IDigitalInterruptController : IPinController

Methods

CreateDigitalInterruptPort(IPin, InterruptMode, ResistorMode, TimeSpan, TimeSpan)

Creates an IDigitalInterruptPort on the specified pin.

View Source
IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin, InterruptMode interruptMode, ResistorMode resistorMode, TimeSpan debounceDuration, TimeSpan glitchDuration)
Returns

Meadow.Hardware.IDigitalInterruptPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.
Meadow.Hardware.InterruptModeinterruptModeAn InterruptMode describing whether or
not the port should be notify on change, and what type of change to
notify on. |

| Meadow.Hardware.ResistorMode | resistorMode | The ResistorMode specifying whether an external pull-up/pull-down resistor is used, or an internal pull-up/pull-down resistor should be configured for default state. | | System.TimeSpan | debounceDuration | The duration, with microseconds (µs) resolution, of the time to ignore state changes after a deliberate state change has occurred. Used to prevent unwanted state changes due to noise. Set to 0 if no debounce filter is required. | | System.TimeSpan | glitchDuration | The minimum duration, with microseconds (µs) resolution, of an initial state change to persist before it's notified as an intentional state change, rather than a spurious one. Use this to ensure that noise doesn't trigger an in interrupt. |

CreateDigitalInterruptPort(IPin, InterruptMode)

Creates an IDigitalInterruptPort on the specified pin.

View Source
IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin, InterruptMode interruptMode)
Returns

Meadow.Hardware.IDigitalInterruptPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.
Meadow.Hardware.InterruptModeinterruptModeAn InterruptMode describing whether or
not the port should be notify on change, and what type of change to
notify on. |

CreateDigitalInterruptPort(IPin, InterruptMode, ResistorMode)

Creates an IDigitalInterruptPort on the specified pin.

View Source
IDigitalInterruptPort CreateDigitalInterruptPort(IPin pin, InterruptMode interruptMode, ResistorMode resistorMode)
Returns

Meadow.Hardware.IDigitalInterruptPort

Parameters
TypeNameDescription
Meadow.Hardware.IPinpinThe pin on which to create the port.
Meadow.Hardware.InterruptModeinterruptModeAn InterruptMode describing whether or
not the port should be notify on change, and what type of change to
notify on. |

| Meadow.Hardware.ResistorMode | resistorMode | The ResistorMode specifying whether an external pull-up/pull-down resistor is used, or an internal pull-up/pull-down resistor should be configured for default state. |