Jaa


GpioPinDriveMode Enum

Definition

Describes whether a general-purpose I/O (GPIO) pin is configured as an input or an output, and how values are driven onto the pin.

public enum class GpioPinDriveMode
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.DevicesLowLevelContract, 65536)]
enum class GpioPinDriveMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.DevicesLowLevelContract), 65536)]
public enum GpioPinDriveMode
var value = Windows.Devices.Gpio.GpioPinDriveMode.input
Public Enum GpioPinDriveMode
Inheritance
GpioPinDriveMode
Attributes

Windows requirements

Device family
Windows IoT Extension SDK (introduced in 10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced in v1.0)

Fields

Name Value Description
Input 0

Configures the GPIO pin in floating mode, with high impedance.

input pin drive image

If you call the GpioPin.Read method for this pin, the method returns the current state of the pin as driven externally.

If you call the GpioPin.Write method, the method sets the latched output value for the pin. The pin takes on this latched output value when the pin is changed to an output.

Output 1

Configures the GPIO pin in strong drive mode, with low impedance.

output pin drive image

If you call the GpioPin.Write method for this pin with a value of GpioPinValue.High, the method produces a low-impedance high value for the pin. If you call the GpioPin.Write method for this pin with a value of GpioPinValue.Low, the method produces a low-impedance low value for the pin.

If you call the GpioPin.Read method for this pin, the method returns the value previously written to the pin.

InputPullUp 2

Configures the GPIO pin as high impedance with a pull-up resistor to the voltage charge connection (VCC).

input pull up image

If you call the GpioPin.Read method for this pin, the method returns the value previously written to the pin.

InputPullDown 3

Configures the GPIO pin as high impedance with a pull-down resistor to ground.

input pull down image

If you call the GpioPin.Read method for this pin, the method returns the current value of the pin as driven externally.

OutputOpenDrain 4

Configures the GPIO in open drain mode.

output open drain image

If you call the GpioPin.Write method for this pin with a value of GpioPinValue.Low, the method drives a value of low to the pin. If you call the GpioPin.Write method for this pin with a value of GpioPinValue.High, the method places the pin in floating mode.

OutputOpenDrainPullUp 5

Configures the GPIO pin in open drain mode with resistive pull-up mode.

output open drain pull up image

If you call the GpioPin.Write method for this pin with a value of GpioPinValue.Low, the method produces a low-impedance low state. If you call the GpioPin.Write method for this pin with a value of GpioPinValue.High, the method configures the pin as high impedance with a pull-up resistor to VCC.

OutputOpenSource 6

Configures the GPIO pin in open collector mode.

output open source image

If you call the GpioPin.Write method for this pin with a value of GpioPinValue.High, the method drives a value of high onto the pin. If you call the GpioPin.Write method for this pin with a value of GpioPinValue.Low, the method configures the pin in floating mode.

OutputOpenSourcePullDown 7

Configures the GPIO pin in open collector mode with resistive pull-down mode.

output open source pull down image

If you call the GpioPin.Write method for this pin with a value of GpioPinValue.High, the method drives a value of high onto the pin. If you call the GpioPin.Write method for this pin with a value of GpioPinValue.Low, the method configures the pin as high impedance with a pull-down resistor to ground.

Applies to

See also