GpioController.WaitForEvent Method

Definition

Overloads

WaitForEvent(Int32, PinEventTypes, CancellationToken)

Blocks execution until an event of type eventType is received or a cancellation is requested.

WaitForEvent(Int32, PinEventTypes, TimeSpan)

Blocks execution until an event of type eventType is received or a period of time has expired.

WaitForEvent(Int32, PinEventTypes, CancellationToken)

Blocks execution until an event of type eventType is received or a cancellation is requested.

public System.Device.Gpio.WaitForEventResult WaitForEvent (int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken cancellationToken);
public virtual System.Device.Gpio.WaitForEventResult WaitForEvent (int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken cancellationToken);
member this.WaitForEvent : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Device.Gpio.WaitForEventResult
abstract member WaitForEvent : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Device.Gpio.WaitForEventResult
override this.WaitForEvent : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Device.Gpio.WaitForEventResult
Public Function WaitForEvent (pinNumber As Integer, eventTypes As PinEventTypes, cancellationToken As CancellationToken) As WaitForEventResult
Public Overridable Function WaitForEvent (pinNumber As Integer, eventTypes As PinEventTypes, cancellationToken As CancellationToken) As WaitForEventResult

Parameters

pinNumber
Int32

The pin number in the controller's numbering scheme.

eventTypes
PinEventTypes

The event types to wait for.

cancellationToken
CancellationToken

The cancellation token of when the operation should stop waiting for an event.

Returns

A structure that contains the result of the waiting operation.

Applies to

WaitForEvent(Int32, PinEventTypes, TimeSpan)

Blocks execution until an event of type eventType is received or a period of time has expired.

public System.Device.Gpio.WaitForEventResult WaitForEvent (int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, TimeSpan timeout);
member this.WaitForEvent : int * System.Device.Gpio.PinEventTypes * TimeSpan -> System.Device.Gpio.WaitForEventResult
Public Function WaitForEvent (pinNumber As Integer, eventTypes As PinEventTypes, timeout As TimeSpan) As WaitForEventResult

Parameters

pinNumber
Int32

The pin number in the controller's numbering scheme.

eventTypes
PinEventTypes

The event types to wait for.

timeout
TimeSpan

The time to wait for the event.

Returns

A structure that contains the result of the waiting operation.

Applies to