GpioOpenStatus 枚举

定义

介绍使用 GpioController.TryOpenPin 方法打开图钉的可能结果。

public enum class GpioOpenStatus
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.DevicesLowLevelContract, 65536)]
enum class GpioOpenStatus
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.DevicesLowLevelContract), 65536)]
public enum GpioOpenStatus
var value = Windows.Devices.Gpio.GpioOpenStatus.pinOpened
Public Enum GpioOpenStatus
继承
GpioOpenStatus
属性

Windows 要求

设备系列
Windows IoT Extension SDK (在 10.0.10240.0 中引入)
API contract
Windows.Devices.DevicesLowLevelContract (在 v1.0 中引入)

字段

MuxingConflict 3

引脚当前已为其他函数打开,例如 I2cSpiUART。 确保引脚未由其他函数使用。

PinOpened 0

已成功打开 GPIO 引脚。

PinUnavailable 1

该引脚由系统保留,不适用于在用户模式下运行的应用。

SharingViolation 2

引脚当前在不兼容的共享模式下打开。 例如:

  • 引脚已在 GpioSharingMode.Exclusive 模式下打开。
  • 当你请求在 GpioSharingMode.Exclusive 模式下打开该图钉时,已在 GpioSharingMode.SharedReadOnly 模式下打开。
UnknownError 4

无法打开引脚。

适用于

另请参阅