GpioController 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 the default general-purpose I/O (GPIO) controller for the system.
public ref class GpioController sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.DevicesLowLevelContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
class GpioController final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.DevicesLowLevelContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
public sealed class GpioController
Public NotInheritable Class GpioController
- Inheritance
- Attributes
Windows requirements
Device family |
Windows IoT Extension SDK (introduced in 10.0.10240.0)
|
API contract |
Windows.Devices.DevicesLowLevelContract (introduced in v1.0)
|
Remarks
To get a GpioController object, use the GpioController.GetDefault method.
Version history
Windows version | SDK version | Value added |
---|---|---|
1511 | 10586 | GetControllersAsync |
1511 | 10586 | GetDefaultAsync |
Properties
PinCount |
Gets the number of pins on the general-purpose I/O (GPIO) controller. |
Methods
GetControllersAsync(IGpioProvider) |
Gets all the controllers that are connected to the system asynchronously. |
GetDefault() |
Gets the default general-purpose I/O (GPIO) controller for the system. |
GetDefaultAsync() |
Gets the default general-purpose I/O (GPIO) controller for the system. |
OpenPin(Int32, GpioSharingMode) |
Opens the specified general-purpose I/O (GPIO) pin in the specified mode. |
OpenPin(Int32) |
Opens a connection to the specified general-purpose I/O (GPIO) pin in exclusive mode. |
TryOpenPin(Int32, GpioSharingMode, GpioPin, GpioOpenStatus) |
Opens the specified general-purpose I/O (GPIO) pin in the specified mode, and gets a status value that you can use to handle a failure to open the pin programmatically. |