GpioDriver.WaitForEventAsync(Int32, PinEventTypes, CancellationToken) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Async call until an event of type eventType is received or a cancellation is requested.
protected internal virtual System.Threading.Tasks.ValueTask<System.Device.Gpio.WaitForEventResult> WaitForEventAsync (int pinNumber, System.Device.Gpio.PinEventTypes eventTypes, System.Threading.CancellationToken cancellationToken);
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>
Protected Friend Overridable Function WaitForEventAsync (pinNumber As Integer, eventTypes As PinEventTypes, cancellationToken As CancellationToken) As ValueTask(Of WaitForEventResult)
Parameters
- pinNumber
- Int32
The pin number in the driver's logical 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 task representing the operation of getting the structure that contains the result of the waiting operation