IGpioPinProvider
IGpioPinProvider
IGpioPinProvider
IGpioPinProvider
Interface
Definition
Represents actions common to general-purpose I/O (GPIO) pin providers.
public : interface IGpioPinProviderpublic interface IGpioPinProviderPublic Interface IGpioPinProvider// You can use this interface in JavaScript.
- Attributes
| Device family |
Windows IoT Extension SDK (introduced v10.0.10586.0)
Windows 10 Anniversary Edition (introduced v10.0.14393.0)
|
| API contract |
Windows.Devices.DevicesLowLevelContract (introduced v2)
|
Properties
DebounceTimeout DebounceTimeout DebounceTimeout DebounceTimeout
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.
public : TimeSpan DebounceTimeout { get; set; }public TimeSpan DebounceTimeout { get; set; }Public ReadWrite Property DebounceTimeout As TimeSpan// You can use this property in JavaScript.
- Value
- TimeSpan TimeSpan TimeSpan TimeSpan
The debounce timeout for the GPIO pin, which is an interval during which changes to the value of the pin are filtered out and do not generate ValueChanged events. If the length of this interval is 0, all changes to the value of the pin generate ValueChanged events.
PinNumber PinNumber PinNumber PinNumber
Gets the pin number of the general-purpose I/O (GPIO) pin.
public : int PinNumber { get; }public int PinNumber { get; }Public ReadOnly Property PinNumber As int// You can use this property in JavaScript.
- Value
- int int int int
The pin number of the GPIO pin.
SharingMode SharingMode SharingMode SharingMode
Gets the sharing mode in which the general-purpose I/O (GPIO) pin is open.
public : ProviderGpioSharingMode SharingMode { get; }public ProviderGpioSharingMode SharingMode { get; }Public ReadOnly Property SharingMode As ProviderGpioSharingMode// You can use this property in JavaScript.
- Value
- ProviderGpioSharingMode ProviderGpioSharingMode ProviderGpioSharingMode ProviderGpioSharingMode
The sharing mode in which the GPIO pin is open.
Methods
GetDriveMode() GetDriveMode() GetDriveMode() GetDriveMode()
Gets the pin's currently configured drive mode.
public : ProviderGpioPinDriveMode GetDriveMode()public ProviderGpioPinDriveMode GetDriveMode()Public Function GetDriveMode() As ProviderGpioPinDriveMode// You can use this method in JavaScript.
The drive mode of the pin.
IsDriveModeSupported(ProviderGpioPinDriveMode) IsDriveModeSupported(ProviderGpioPinDriveMode) IsDriveModeSupported(ProviderGpioPinDriveMode) IsDriveModeSupported(ProviderGpioPinDriveMode)
Determines if a drive mode is supported for the pin.
public : PlatForm::Boolean IsDriveModeSupported(ProviderGpioPinDriveMode driveMode)public bool IsDriveModeSupported(ProviderGpioPinDriveMode driveMode)Public Function IsDriveModeSupported(driveMode As ProviderGpioPinDriveMode) As bool// You can use this method in JavaScript.
- driveMode
- ProviderGpioPinDriveMode ProviderGpioPinDriveMode ProviderGpioPinDriveMode ProviderGpioPinDriveMode
The desired drive mode.
True if the drive mode is supported; otherwise false.
Read() Read() Read() Read()
Reads the current value of the pin.
public : ProviderGpioPinValue Read()public ProviderGpioPinValue Read()Public Function Read() As ProviderGpioPinValue// You can use this method in JavaScript.
The pin's value.
SetDriveMode(ProviderGpioPinDriveMode) SetDriveMode(ProviderGpioPinDriveMode) SetDriveMode(ProviderGpioPinDriveMode) SetDriveMode(ProviderGpioPinDriveMode)
Sets the pin's drive mode.
public : void SetDriveMode(ProviderGpioPinDriveMode value)public void SetDriveMode(ProviderGpioPinDriveMode value)Public Function SetDriveMode(value As ProviderGpioPinDriveMode) As void// You can use this method in JavaScript.
- value
- ProviderGpioPinDriveMode ProviderGpioPinDriveMode ProviderGpioPinDriveMode ProviderGpioPinDriveMode
The desired drive mode for the pin.
Write(ProviderGpioPinValue) Write(ProviderGpioPinValue) Write(ProviderGpioPinValue) Write(ProviderGpioPinValue)
Writes a value to the pin.
public : void Write(ProviderGpioPinValue value)public void Write(ProviderGpioPinValue value)Public Function Write(value As ProviderGpioPinValue) As void// You can use this method in JavaScript.
The value to write.
Events
ValueChanged ValueChanged ValueChanged ValueChanged
Event that fires when the value of the pin has changed.
public : abstract event TypedEventHandler ValueChanged<IGpioPinProvider, GpioPinProviderValueChangedEventArgs>public abstract event TypedEventHandler ValueChanged<IGpioPinProvider, GpioPinProviderValueChangedEventArgs>Public MustInherit Event ValueChanged<IGpioPinProvider, GpioPinProviderValueChangedEventArgs>// You can use this event in JavaScript.