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
要设置的模式。
返回
适用于
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
控制器编号方案中的引脚编号。