GpioPin Class
Definition
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.
Represents a general-purpose I/O (GPIO) pin.
public class GpioPin
type GpioPin = class
Public Class GpioPin
- Inheritance
-
GpioPin
Properties
PinNumber |
Gets the pin number of the general-purpose I/O (GPIO) pin. |
Methods
GetPinMode() |
Gets the current pin mode for the general-purpose I/O (GPIO) pin. The pin mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin. |
IsPinModeSupported(PinMode) |
Gets whether the general-purpose I/O (GPIO) pin supports the specified pin mode. |
Read() |
Reads the current value of the general-purpose I/O (GPIO) pin. |
SetPinMode(PinMode) |
Sets the pin mode of the general-purpose I/O (GPIO) pin. The pin mode specifies whether the pin is configured as an input or an output, and determines how values are driven onto the pin. |
Toggle() |
Toggles the output of the general purpose I/O (GPIO) pin if the pin is configured as an output. |
Write(PinValue) |
Drives the specified value onto the general purpose I/O (GPIO) pin according to the current pin 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. |
Events
ValueChanged |
Occurs when the value of the general-purpose I/O (GPIO) pin changes, either because of an external stimulus when the pin is configured as an input, or when a value is written to the pin when the pin in configured as an output. |