Jaa


GpioPin.Write(GpioPinValue) Method

Definition

Drives the specified value onto the general purpose I/O (GPIO) pin according to the current drive mode for the pin if the pin is configured as an output, or updates the latched output value for the pin if the pin is configured as an input.

public:
 virtual void Write(GpioPinValue value) = Write;
void Write(GpioPinValue const& value);
public void Write(GpioPinValue value);
function write(value)
Public Sub Write (value As GpioPinValue)

Parameters

value
GpioPinValue

The enumeration value to write to the GPIO pin.

If the GPIO pin is configured as an output, the method drives the specified value onto the pin according to the current drive mode for the pin.

If the GPIO pin is configured as an input, the method updates the latched output value for the pin. The latched output value is driven onto the pin when the configuration for the pin changes to output.

Windows requirements

App capabilities
lowLevel

Remarks

The following exceptions can be thrown by this method:

E_ACCESSDENIED

The GPIO pin is open in shared read-only mode. To write to the pin, close the pin and reopen the pin in exclusive mode.

Applies to

See also