Share via


GpioPin.SetDriveMode(GpioPinDriveMode) Method

Definition

Sets the drive mode of the general-purpose I/O (GPIO) pin. The drive mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.

public:
 virtual void SetDriveMode(GpioPinDriveMode value) = SetDriveMode;
void SetDriveMode(GpioPinDriveMode const& value);
public void SetDriveMode(GpioPinDriveMode value);
function setDriveMode(value)
Public Sub SetDriveMode (value As GpioPinDriveMode)

Parameters

value
GpioPinDriveMode

An enumeration value that specifies drive mode to use for the GPIO pin. The drive mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin.

Windows requirements

App capabilities
lowLevel

Remarks

The following exceptions can be thrown by this method:

E_INVALIDARG

The GPIO pin does not support the specified drive mode.

E_ACCESSDENIED

The pin is open in shared read-only mode. Close the pin and reopen it in exclusive mode to change the drive mode of the pin.

Applies to

See also