I2cSharingMode I2cSharingMode I2cSharingMode I2cSharingMode I2cSharingMode 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 I2cSharingMode
enum class winrt::Windows::Devices::I2c::I2cSharingMode : int32_t
public enum I2cSharingMode
Public Enum I2cSharingMode
var value = Windows.Devices.I2c.I2cSharingMode.exclusive;
Attributes

Windows 10 requirements

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

Fields

Exclusive Exclusive Exclusive Exclusive 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 Shared Shared Shared 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.

See also