GpioController.OpenPin 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
OpenPin(Int32, PinMode) |
開啟釘選,並將其設定為特定模式。 |
OpenPin(Int32, PinMode, PinValue) |
開啟釘選,並將它設定為特定的模式和值。 |
OpenPin(Int32) |
開啟釘選,使其可供使用。 驅動程式會嘗試開啟針腳,而不變更其模式或值。 |
OpenPin(Int32, PinMode)
開啟釘選,並將其設定為特定模式。
public void OpenPin (int pinNumber, System.Device.Gpio.PinMode mode);
public System.Device.Gpio.GpioPin OpenPin (int pinNumber, System.Device.Gpio.PinMode mode);
member this.OpenPin : int * System.Device.Gpio.PinMode -> unit
member this.OpenPin : int * System.Device.Gpio.PinMode -> System.Device.Gpio.GpioPin
Public Sub OpenPin (pinNumber As Integer, mode As PinMode)
Public Function OpenPin (pinNumber As Integer, mode As PinMode) As GpioPin
參數
- pinNumber
- Int32
控制器編號配置中的針腳編號。
- mode
- PinMode
要設定的模式。
傳回
適用於
OpenPin(Int32, PinMode, PinValue)
開啟釘選,並將它設定為特定的模式和值。
public void OpenPin (int pinNumber, System.Device.Gpio.PinMode mode, System.Device.Gpio.PinValue initialValue);
public System.Device.Gpio.GpioPin OpenPin (int pinNumber, System.Device.Gpio.PinMode mode, System.Device.Gpio.PinValue initialValue);
member this.OpenPin : int * System.Device.Gpio.PinMode * System.Device.Gpio.PinValue -> unit
member this.OpenPin : int * System.Device.Gpio.PinMode * System.Device.Gpio.PinValue -> System.Device.Gpio.GpioPin
Public Sub OpenPin (pinNumber As Integer, mode As PinMode, initialValue As PinValue)
Public Function OpenPin (pinNumber As Integer, mode As PinMode, initialValue As PinValue) As GpioPin
參數
- pinNumber
- Int32
控制器編號配置中的針腳編號。
- mode
- PinMode
要設定的模式。
- initialValue
- PinValue
如果模式為輸出,要設定的初始值。 驅動程式會嘗試設定模式,而不會造成其他值發生問題。
如果 為 initialValue
High , (,則針腳在開啟) 期間不應該故障為低
傳回
適用於
OpenPin(Int32)
開啟釘選,使其可供使用。 驅動程式會嘗試開啟針腳,而不變更其模式或值。
public void OpenPin (int pinNumber);
public System.Device.Gpio.GpioPin OpenPin (int pinNumber);
member this.OpenPin : int -> unit
member this.OpenPin : int -> System.Device.Gpio.GpioPin
Public Sub OpenPin (pinNumber As Integer)
Public Function OpenPin (pinNumber As Integer) As GpioPin
參數
- pinNumber
- Int32
控制器編號配置中的針腳編號。