GpioController.OpenPin 方法

定义

重载

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

如果模式为输出,则设置的初始值。 驱动程序将尝试设置模式,而不会导致另一个值出现故障。 (如果 initialValueHigh,则引脚不应在打开)

返回

适用于

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

控制器编号方案中的引脚编号。

返回

适用于