GpioController.OpenPin Method
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
OpenPin(Int32, PinMode) |
Opens a pin and sets it to a specific mode. |
OpenPin(Int32, PinMode, PinValue) |
Opens a pin and sets it to a specific mode and value. |
OpenPin(Int32) |
Opens a pin in order for it to be ready to use. The driver attempts to open the pin without changing its mode or value. |
Opens a pin and sets it to a specific mode.
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
Parameters
- pinNumber
- Int32
The pin number in the controller's numbering scheme.
- mode
- PinMode
The mode to be set.
Returns
Applies to
.NET IoT Libraries 2.2.0 and other versions
Product | Versions |
---|---|
.NET IoT Libraries | 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0, 2.1.0, 2.2.0 |
Opens a pin and sets it to a specific mode and value.
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
Parameters
- pinNumber
- Int32
The pin number in the controller's numbering scheme.
- mode
- PinMode
The mode to be set.
- initialValue
- PinValue
The initial value to be set if the mode is output. The driver will attempt to set the mode without causing glitches to the other value.
(if initialValue
is High, the pin should not glitch to low during open)
Returns
Applies to
.NET IoT Libraries 2.2.0 and other versions
Product | Versions |
---|---|
.NET IoT Libraries | 1.5.0, 2.0.0, 2.1.0, 2.2.0 |
Opens a pin in order for it to be ready to use. The driver attempts to open the pin without changing its mode or value.
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
Parameters
- pinNumber
- Int32
The pin number in the controller's numbering scheme.
Returns
Applies to
.NET IoT Libraries 2.2.0 and other versions
Product | Versions |
---|---|
.NET IoT Libraries | 1.0.0, 1.1.0, 1.2.0, 1.3.0, 1.4.0, 1.5.0, 2.0.0, 2.1.0, 2.2.0 |