GpioController.WaitForEventAsync 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
WaitForEventAsync(Int32, PinEventTypes, CancellationToken) |
非同步呼叫,直到收到 eventType 類型的事件或要求取消為止。 |
WaitForEventAsync(Int32, PinEventTypes, TimeSpan) |
非同步呼叫以等候,直到收到 eventType 類型的事件或一段時間已過期為止。 |
WaitForEventAsync(Int32, PinEventTypes, CancellationToken)
非同步呼叫,直到收到 eventType 類型的事件或要求取消為止。
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)
參數
- pinNumber
- Int32
控制器編號配置中的針腳編號。
- eventTypes
- PinEventTypes
要等候的事件種類。
- token
- CancellationToken
作業何時應該停止等候事件的解除標記。
傳回
表示取得結構之作業的工作,其中包含等候作業的結果
適用於
WaitForEventAsync(Int32, PinEventTypes, TimeSpan)
非同步呼叫以等候,直到收到 eventType 類型的事件或一段時間已過期為止。
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)
參數
- pinNumber
- Int32
控制器編號配置中的針腳編號。
- eventTypes
- PinEventTypes
要等候的事件種類。
- timeout
- TimeSpan
等候事件的時間。
傳回
工作,表示取得包含等候作業結果的結構作業。