GpioPin Class
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 ref class GpioPin sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.DevicesLowLevelContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class GpioPin final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.DevicesLowLevelContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class GpioPin : System.IDisposable
Public NotInheritable Class GpioPin
Implements IDisposable
- Inheritance
- Attributes
- Implements
Device family |
Windows IoT Extension SDK (introduced in 10.0.10240.0)
|
API contract |
Windows.Devices.DevicesLowLevelContract (introduced in v1.0)
|
To get a GpioPin object, use the GpioController.OpenPin or GpioController.TryOpenPin method.
Debounce |
Gets or sets the debounce timeout for the general-purpose I/O (GPIO) pin, which is an interval during which changes to the value of the pin are filtered out, and do not generate ValueChanged events. |
Pin |
Gets the pin number of the general-purpose I/O (GPIO) pin. |
Sharing |
Gets the sharing mode in which the general-purpose I/O (GPIO) pin is open. |
Close() |
Closes the general-purpose I/O (GPIO) pin and releases the resources associated with it. |
Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
Get |
Gets the current drive mode for 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. |
Is |
Gets whether the general-purpose I/O (GPIO) pin supports the specified drive mode. |
Read() |
Reads the current value of the general-purpose I/O (GPIO) pin. |
Set |
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. |
Write(Gpio |
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. |
Value |
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 is configured as an output. |
Product | Versions |
---|---|
WinRT | Build 10240, Build 10586, Build 14383, Build 15063, Build 16299, Build 17134, Build 17763, Build 18362, Build 19041, Build 20348, Build 22000, Build 22621, Build 26100 |