diff --git a/Source/Meadow.Contracts/Hardware/Contracts/IOControllers/II2cController.cs b/Source/Meadow.Contracts/Hardware/Contracts/IOControllers/II2cController.cs index 3b411536..1cd09c0d 100644 --- a/Source/Meadow.Contracts/Hardware/Contracts/IOControllers/II2cController.cs +++ b/Source/Meadow.Contracts/Hardware/Contracts/IOControllers/II2cController.cs @@ -10,29 +10,22 @@ public interface II2cController /// public static I2cBusSpeed DefaultI2cBusSpeed = I2cBusSpeed.Standard; - /// - /// Creates an I2C bus instance for the default pins. - /// - /// The bus number - /// An instance of an I2cBus - II2cBus CreateI2cBus( - int busNumber = 0); - /// /// Creates an I2C bus instance for the default pins and the requested bus speed /// - /// The bus speed. + /// The bus speed /// The bus number /// An instance of an I2cBus II2cBus CreateI2cBus( - int busNumber, - I2cBusSpeed busSpeed + int busNumber = 1, + I2cBusSpeed busSpeed = I2cBusSpeed.Standard ); /// /// Creates an I2C bus instance for the requested pins and bus speed /// - /// The bus speed. + /// An array of two pins holding the I2C clock and data pins + /// The bus speed /// An instance of an I2cBus II2cBus CreateI2cBus( IPin[] pins, @@ -42,7 +35,9 @@ I2cBusSpeed busSpeed /// /// Creates an I2C bus instance for the requested pins and bus speed /// - /// The bus speed. + /// The I2C clock pin + /// The I2C data pin + /// The bus speed /// An instance of an I2cBus II2cBus CreateI2cBus( IPin clock, diff --git a/Source/Meadow.Contracts/IPlatformOS.cs b/Source/Meadow.Contracts/IPlatformOS.cs index 91eb7094..2ad6cbc5 100644 --- a/Source/Meadow.Contracts/IPlatformOS.cs +++ b/Source/Meadow.Contracts/IPlatformOS.cs @@ -41,7 +41,7 @@ public partial interface IPlatformOS : IPowerController public SerialPortName? GetSerialPortName(string portName) { return GetSerialPortNames().FirstOrDefault( - p => string.Compare(p.FriendlyName, "portName", true) == 0 + p => string.Compare(p.FriendlyName, portName, true) == 0 || string.Compare(p.SystemName, portName, true) == 0); } }