GpioController.OpenPin Method

Definition

Overloads

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.

OpenPin(Int32, PinMode)

Opens a pin and sets it to a specific mode.

C#
public void OpenPin (int pinNumber, System.Device.Gpio.PinMode mode);
C#
public System.Device.Gpio.GpioPin OpenPin (int pinNumber, System.Device.Gpio.PinMode mode);

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

OpenPin(Int32, PinMode, PinValue)

Opens a pin and sets it to a specific mode and value.

C#
public void OpenPin (int pinNumber, System.Device.Gpio.PinMode mode, System.Device.Gpio.PinValue initialValue);
C#
public System.Device.Gpio.GpioPin OpenPin (int pinNumber, System.Device.Gpio.PinMode mode, System.Device.Gpio.PinValue initialValue);

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

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.

C#
public void OpenPin (int pinNumber);
C#
public System.Device.Gpio.GpioPin OpenPin (int pinNumber);

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