Edit

Share via


GpioController.WaitForEventAsync Method

Definition

Overloads

WaitForEventAsync(Int32, PinEventTypes, CancellationToken)

Async call until an event of type eventType is received or a cancellation is requested.

WaitForEventAsync(Int32, PinEventTypes, TimeSpan)

Async call to wait until an event of type eventType is received or a period of time has expired.

WaitForEventAsync(Int32, PinEventTypes, CancellationToken)

Async call until an event of type eventType is received or a cancellation is requested.

public System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult> WaitForEventAsync (int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken token);
public virtual System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult> WaitForEventAsync (int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken token);
member this.WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
abstract member WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
override this.WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
Public Function WaitForEventAsync (pinNumber As Integer, eventTypes As PinEventTypes, token As CancellationToken) As ValueTask(Of WaitForEventResult)
Public Overridable Function WaitForEventAsync (pinNumber As Integer, eventTypes As PinEventTypes, token As CancellationToken) As ValueTask(Of WaitForEventResult)

Parameters

pinNumber
Int32

The pin number in the controller's numbering scheme.

eventTypes
PinEventTypes

The event types to wait for.

token
CancellationToken

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

Returns

A task representing the operation of getting the structure that contains the result of the waiting operation

Applies to

WaitForEventAsync(Int32, PinEventTypes, TimeSpan)

Async call to wait until an event of type eventType is received or a period of time has expired.

public System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult> WaitForEventAsync (int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, TimeSpan timeout);
member this.WaitForEventAsync : int * System.Device.Gpio.PinEventTypes * TimeSpan -> System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult>
Public Function WaitForEventAsync (pinNumber As Integer, eventTypes As PinEventTypes, timeout As TimeSpan) As ValueTask(Of 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 task representing the operation of getting the structure that contains the result of the waiting operation.

Applies to