GpioController GpioController GpioController GpioController GpioController Class

Definition

Represents the default general-purpose I/O (GPIO) controller for the system.

public : sealed class GpioController
struct winrt::Windows::Devices::Gpio::GpioController
public sealed class GpioController
Public NotInheritable Class GpioController
// This class does not provide a public constructor.
Attributes

Windows 10 requirements

Device family
Windows IoT Extension SDK (introduced v10.0.10240.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced v1)

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 PinCount PinCount PinCount PinCount

Gets the number of pins on the general-purpose I/O (GPIO) controller.

Methods

GetControllersAsync(IGpioProvider) GetControllersAsync(IGpioProvider) GetControllersAsync(IGpioProvider) GetControllersAsync(IGpioProvider) GetControllersAsync(IGpioProvider)

Gets all the controllers that are connected to the system asynchronously.

GetDefault() GetDefault() GetDefault() GetDefault() GetDefault()

Gets the default general-purpose I/O (GPIO) controller for the system.

GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync() GetDefaultAsync()

Gets the default general-purpose I/O (GPIO) controller for the system.

OpenPin(Int32) OpenPin(Int32) OpenPin(Int32) OpenPin(Int32) OpenPin(Int32)

Opens a connection to the specified general-purpose I/O (GPIO) pin in exclusive mode.

OpenPin(Int32, GpioSharingMode) OpenPin(Int32, GpioSharingMode) OpenPin(Int32, GpioSharingMode) OpenPin(Int32, GpioSharingMode) OpenPin(Int32, GpioSharingMode)

Opens the specified general-purpose I/O (GPIO) pin in the specified mode.

TryOpenPin(Int32, GpioSharingMode, GpioPin, GpioOpenStatus) TryOpenPin(Int32, GpioSharingMode, GpioPin, GpioOpenStatus) TryOpenPin(Int32, GpioSharingMode, GpioPin, GpioOpenStatus) TryOpenPin(Int32, GpioSharingMode, GpioPin, GpioOpenStatus) 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.

See also