diff --git a/src/System.Device.Gpio/System/Device/I2c/I2cDevice.Linux.cs b/src/System.Device.Gpio/System/Device/I2c/I2cDevice.Linux.cs new file mode 100644 index 0000000000000000000000000000000000000000..05f183af318d9df43acf1a0e7c2a661f0cd9b26d --- /dev/null +++ b/src/System.Device.Gpio/System/Device/I2c/I2cDevice.Linux.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Device.I2c +{ + public partial class I2cDevice + { + /// + /// Creates a communications channel to a device on an I2C bus running on Unix. + /// + /// The connection settings of a device on an I2C bus. + /// A communications channel to a device on an I2C bus running on Unix. + public static I2cDevice Create(I2cConnectionSettings settings) => new Drivers.UnixI2cDevice(settings); + } +} diff --git a/src/System.Device.Gpio/System/Device/I2c/I2cDevice.Windows.cs b/src/System.Device.Gpio/System/Device/I2c/I2cDevice.Windows.cs new file mode 100644 index 0000000000000000000000000000000000000000..c214e622e589d1d1ce4bee123d3031f67c7c5112 --- /dev/null +++ b/src/System.Device.Gpio/System/Device/I2c/I2cDevice.Windows.cs @@ -0,0 +1,16 @@ +// Licensed to the .NET Foundation under one or more agreements. +// The .NET Foundation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace System.Device.I2c +{ + public partial class I2cDevice + { + /// + /// Creates a communications channel to a device on an I2C bus running on Windows 10 IoT. + /// + /// The connection settings of a device on an I2C bus. + /// A communications channel to a device on an I2C bus running on Windows 10 IoT. + public static I2cDevice Create(I2cConnectionSettings settings) => new Drivers.Windows10I2cDevice(settings); + } +} diff --git a/src/System.Device.Gpio/System/Device/I2c/I2cDevice.cs b/src/System.Device.Gpio/System/Device/I2c/I2cDevice.cs index 576f08fbe33a9811dd268e9661531dcfbc48a7d2..f50855a54d1d8a7bc43c67911352eb5328678a95 100644 --- a/src/System.Device.Gpio/System/Device/I2c/I2cDevice.cs +++ b/src/System.Device.Gpio/System/Device/I2c/I2cDevice.cs @@ -7,7 +7,7 @@ namespace System.Device.I2c /// /// The communications channel to a device on an I2C bus. /// - public abstract class I2cDevice : IDisposable + public abstract partial class I2cDevice : IDisposable { /// /// The connection settings of a device on an I2C bus.