GpioDriver.WaitForEventAsync(Int32, PinEventTypes, CancellationToken) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
非同步呼叫,直到收到 eventType 類型的事件或要求取消為止。
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)
參數
- pinNumber
- Int32
驅動程式邏輯編號配置中的針腳編號。
- eventTypes
- PinEventTypes
要等候的事件種類。
- cancellationToken
- CancellationToken
作業應該停止等候事件的解除標記。
傳回
工作,表示取得包含等候作業結果的結構作業