Jaa


ProviderI2cSharingMode Enum

Definition

Describes the modes in which you can connect to an inter-integrated circuit (I2 C) bus address. These modes determine whether other connections to the I2 C bus address can be opened while you are connected to the I2 C bus address.

public enum class ProviderI2cSharingMode
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Devices.DevicesLowLevelContract, 131072)]
enum class ProviderI2cSharingMode
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Devices.DevicesLowLevelContract), 131072)]
public enum ProviderI2cSharingMode
var value = Windows.Devices.I2c.Provider.ProviderI2cSharingMode.exclusive
Public Enum ProviderI2cSharingMode
Inheritance
ProviderI2cSharingMode
Attributes

Windows requirements

Device family
Windows IoT Extension SDK (introduced in 10.0.10586.0)
Windows 10 Anniversary Edition (introduced in 10.0.14393.0)
API contract
Windows.Devices.DevicesLowLevelContract (introduced in v2.0)

Fields

Name Value Description
Exclusive 0

Connects to the I2 C bus address exclusively, so that no other connection to the I2 C bus address can be made while you remain connected. This mode is the default mode.

Shared 1

Connects to the I2 C bus address in shared mode, so that other connections to the I2 C bus address can be made while you remain connected.

You can perform all operations on shared connections, but use such connections with care. When multiple client apps change the global state of the I2 C device, race conditions can result.

An example use case for using a shared connection is a sensor that obtains readings without changing the state of the device.

Applies to