From 6eed9a61a3f120d49eb2de527dca775d1fee6ea5 Mon Sep 17 00:00:00 2001 From: Adrian Stevens Date: Wed, 19 Jan 2022 21:52:01 -0800 Subject: [PATCH] Standardize I2C addresses enums --- .../Audio.Radio.Tea5767/Tea5767.Enums.cs | 6 +-- .../Driver/Audio.Radio.Tea5767/Tea5767.cs | 2 +- .../I2cCharacterDisplay.Enums.cs | 12 ++++-- .../Displays.Ssd130x/Drivers/Ssd1306.cs | 6 +-- .../Displays.Ssd130x/Drivers/Ssd1309.cs | 8 +--- .../Displays.Ssd130x/SSd130xBase.Enums.cs | 15 +++++-- .../FeatherWings.CharlieWing/CharlieWing.cs | 9 ++++ .../FeatherWings.MotorWing/MotorWing.cs | 2 +- .../Driver/ICs.ADC.Ads1x15/Ads1015.cs | 2 +- .../Driver/ICs.ADC.Ads1x15/Ads1115.cs | 2 +- .../Driver/ICs.ADC.Ads1x15/Ads1x15.Enums.cs | 2 +- .../Driver/ICs.ADC.Ads1x15/Ads1x15.cs | 2 +- .../Samples/Ads1015_Sample/MeadowApp.cs | 2 +- .../ICs.EEPROM.At24Cxx/At24Cxx.Enums.cs | 12 ++++-- .../Driver/ICs.EEPROM.At24Cxx/At24Cxx.cs | 3 +- .../ICs.IOExpanders.Ht16k33/Ht16k33.Enums.cs | 28 +++++++++++-- .../Is31fl3731.Enums.cs | 15 +++++-- .../Mcp23x08.Addresses.cs | 14 +++++-- .../ICs.IOExpanders.Mcp23x08/Mcp23x08.cs | 3 +- .../ICs.IOExpanders.Pca9685/Pca9685.Enums.cs | 12 ++++-- .../Driver/ICs.IOExpanders.Pca9685/Pca9685.cs | 14 +++---- .../ICs.IOExpanders.TCA9548A/Tca9548A.cs | 42 +++++++++---------- .../Tca9548A.Addresses.cs | 12 ++++-- .../Driver/RTCs.Ds1307/Ds1307.Enums.cs | 14 +++++-- .../RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.cs | 16 +++---- .../Driver/RTCs.Ds323x/Ds3231.Enums.cs | 12 ++++-- .../RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.cs | 4 +- .../AdafruitMPRLS.Enums.cs | 10 ++++- .../Bme280.Addresses.cs | 15 +++++-- .../Bme680.RegisterAddresses.cs | 15 +++++-- .../Bmp085.Enums.cs | 10 ++++- .../Bmp180.Enums.cs | 10 ++++- .../Ccs811.Enums.cs | 2 +- .../Sensors.Atmospheric.Ccs811/Ccs811.cs | 2 +- .../DhtBase.Enums.cs | 10 ++++- .../Hih6130.Enums.cs | 10 ++++- .../Htu21d.Enums.cs | 10 ++++- .../Mpl115a2.Addresses.cs | 10 ++++- .../Mpl3115a2.Addresses.cs | 10 ++++- .../Ms5611.Enums.cs | 10 ++++- .../Sht31d.Enums.cs | 15 +++++-- .../ArducamMini.Enums.cs | 10 ++++- .../Sensors.Camera.Mlx90640/Mlx90640.Enums.cs | 10 ++++- .../Sensors.Distance.Vl53l0x/Vl53l0x.Enums.cs | 10 ++++- .../Ags01Db.Enums.cs | 10 ++++- .../BBQ10Keyboard.Enums.cs | 13 +++++- .../Driver/Sensors.Hid.Mpr121/Mpr121.enums.cs | 10 ++++- .../Sensors.Hid.Tsc2004/Tsc2004.Enums.cs | 13 +++++- .../Sensors.Light.Bh1745/Bh1745.Addresses.cs | 9 ++-- .../Sensors.Light.Bh1750/Bh1750.Addresses.cs | 9 ++-- .../Sensors.Light.Max44009/Max44009.Enums.cs | 17 ++++++-- .../Sensors.Light.Si1145/Si1145.Addresses.cs | 10 ++++- .../Sensors.Light.Tcs3472x/Tcs3472x.enums.cs | 10 ++++- .../Sensors.Light.Tsl2591/Tsl2591.Enums.cs | 10 ++++- .../Veml7700.Addresses.cs | 10 ++++- .../Sensors.LoadCell.Nau7802/Nau7802.Enums.cs | 10 ++++- .../Sensors.Motion.Adxl3xx/Drivers/Adxl345.cs | 2 +- .../Adxl345_Extras/Adxl345.Addresses.cs | 2 +- .../Apds9960.Addresses.cs | 10 ++++- .../Sensors.Motion.Bno055/Bno055.Enums.cs | 2 +- .../Driver/Sensors.Motion.Bno055/Bno055.cs | 2 +- .../Hmc5883.Addresses.cs | 26 +++++++++--- .../Driver/Sensors.Motion.Hmc5883/Qmc5883.cs | 2 +- .../Mag3110.Addresses.cs | 15 +++++-- .../Mpu6050.Addresses.cs | 2 +- .../Driver/Sensors.Motion.Mpu6050/Mpu6050.cs | 11 ++++- .../Sensors.Power.Ina260/Ina260.Enums.cs | 15 +++++-- .../Driver/Sensors.Power.Ina260/Ina260.cs | 4 +- .../Lm75.Addresses.cs | 10 ++++- .../Mcp9808.Enums.cs | 12 ++++-- .../Tmp102.Addresses.cs | 12 ++++-- 71 files changed, 511 insertions(+), 187 deletions(-) diff --git a/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.Enums.cs b/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.Enums.cs index be87e214b7..309bb18235 100644 --- a/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.Enums.cs @@ -5,16 +5,16 @@ public partial class Tea5767 /// /// Valid addresses for the sensor. /// - public enum Addresses : byte + public enum Address : byte { /// /// I2C address 0 /// - Address0 = 0x60, + Address_0x60 = 0x60, /// /// Default I2C address /// - Default = Address0 + Default = Address_0x60 } enum Command : byte diff --git a/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.cs b/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.cs index 01fa095a24..5d293065cb 100644 --- a/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.cs +++ b/Source/Meadow.Foundation.Peripherals/Audio.Radio.Tea5767/Driver/Audio.Radio.Tea5767/Tea5767.cs @@ -30,7 +30,7 @@ public partial class Tea5767 /// /// I2Cbus connected to the radio /// Address of the bus on the I2C display. - public Tea5767(II2cBus i2cBus, byte address = (byte)Addresses.Default) + public Tea5767(II2cBus i2cBus, byte address = (byte)Address.Default) { i2cPeripheral = new I2cPeripheral(i2cBus, address); diff --git a/Source/Meadow.Foundation.Peripherals/Displays.Lcd.CharacterDisplay/Driver/Displays.Lcd.CharacterDisplay/I2cCharacterDisplay.Enums.cs b/Source/Meadow.Foundation.Peripherals/Displays.Lcd.CharacterDisplay/Driver/Displays.Lcd.CharacterDisplay/I2cCharacterDisplay.Enums.cs index 7f3d5cbab7..34b8d7c63a 100644 --- a/Source/Meadow.Foundation.Peripherals/Displays.Lcd.CharacterDisplay/Driver/Displays.Lcd.CharacterDisplay/I2cCharacterDisplay.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Displays.Lcd.CharacterDisplay/Driver/Displays.Lcd.CharacterDisplay/I2cCharacterDisplay.Enums.cs @@ -7,8 +7,14 @@ public partial class I2cCharacterDisplay /// public enum Addresses : byte { - Address0 = 0x27, - Default = Address0 + /// + /// Bus address 0x27 + /// + Address_0x27 = 0x27, + /// + /// Default bus address + /// + Default = Address_0x27 } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1306.cs b/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1306.cs index 42237365e6..9653a46b39 100644 --- a/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1306.cs +++ b/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1306.cs @@ -36,11 +36,7 @@ public Ssd1306(IMeadowDevice device, ISpiBus spiBus, IPin chipSelectPin, IPin dc /// /// Create a new SSD1306 object using the default parameters for /// - /// - /// Note that by default, any pixels out of bounds will throw and exception. - /// This can be changed by setting the - /// property to true. - /// + /// I2cBus connected to display /// Address of the bus on the I2C display. /// Type of SSD1306 display (default = 128x64 pixel display). public Ssd1306(II2cBus i2cBus, diff --git a/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1309.cs b/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1309.cs index 06928537d5..9c9faba720 100644 --- a/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1309.cs +++ b/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/Drivers/Ssd1309.cs @@ -23,13 +23,9 @@ public Ssd1309(IMeadowDevice device, ISpiBus spiBus, IPin chipSelectPin, IPin dc } /// - /// Create a new SSD1309 object using the default parameters for + /// Create a new SSD1309 object /// - /// - /// Note that by default, any pixels out of bounds will throw and exception. - /// This can be changed by setting the - /// property to true. - /// + /// I2cBus connected to display /// Address of the bus on the I2C display. public Ssd1309(II2cBus i2cBus, byte address = (byte)Addresses.Default) : base(i2cBus, address, DisplayType.OLED128x64) { diff --git a/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/SSd130xBase.Enums.cs b/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/SSd130xBase.Enums.cs index 99282d30b4..f76edf9b54 100644 --- a/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/SSd130xBase.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Displays.Ssd130x/Driver/Displays.Ssd130x/SSd130xBase.Enums.cs @@ -10,9 +10,18 @@ public abstract partial class Ssd130xBase /// public enum Addresses : byte { - Address0 = 0x3C, - Address1 = 0x3D, - Default = Address0 + /// + /// Bus address 0x3C + /// + Address_0x3C = 0x3C, + /// + /// Bus address 0x3D + /// + Address_0x3D = 0x3D, + /// + /// Default bus address + /// + Default = Address_0x3C } /// diff --git a/Source/Meadow.Foundation.Peripherals/FeatherWings.CharlieWing/Driver/FeatherWings.CharlieWing/CharlieWing.cs b/Source/Meadow.Foundation.Peripherals/FeatherWings.CharlieWing/Driver/FeatherWings.CharlieWing/CharlieWing.cs index 02269a8af8..db964298f5 100644 --- a/Source/Meadow.Foundation.Peripherals/FeatherWings.CharlieWing/Driver/FeatherWings.CharlieWing/CharlieWing.cs +++ b/Source/Meadow.Foundation.Peripherals/FeatherWings.CharlieWing/Driver/FeatherWings.CharlieWing/CharlieWing.cs @@ -11,10 +11,19 @@ namespace Meadow.Foundation.FeatherWings /// public class CharlieWing : IGraphicsDisplay { + /// + /// Color mode of display + /// public ColorType ColorMode => ColorType.Format8bppGray; + /// + /// Width of display in pixels + /// public int Width => 15; + /// + /// Height of display in pixels + /// public int Height => 7; public byte Frame { get; set; } diff --git a/Source/Meadow.Foundation.Peripherals/FeatherWings.MotorWing/Driver/FeatherWings.MotorWing/MotorWing.cs b/Source/Meadow.Foundation.Peripherals/FeatherWings.MotorWing/Driver/FeatherWings.MotorWing/MotorWing.cs index 7a6ff1ebd8..65e9f2300b 100644 --- a/Source/Meadow.Foundation.Peripherals/FeatherWings.MotorWing/Driver/FeatherWings.MotorWing/MotorWing.cs +++ b/Source/Meadow.Foundation.Peripherals/FeatherWings.MotorWing/Driver/FeatherWings.MotorWing/MotorWing.cs @@ -16,7 +16,7 @@ public class MotorWing /// /// i2c bus /// The address of the i2c Peripheral - /// The PWM frequency for the PCA9685 IC + /// The PWM frequency for the PCA9685 IC public MotorWing(II2cBus i2cBus, byte address = (byte)Pca9685.Addresses.Default, int frequency = 1600) { if (i2cBus == null) diff --git a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1015.cs b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1015.cs index 1ab5091bf5..d176b930a8 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1015.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1015.cs @@ -25,7 +25,7 @@ public SampleRateSetting SampleRate } public Ads1015(II2cBus i2cBus, - Address address = Address.Default, + Addresses address = Addresses.Default, MeasureMode mode = MeasureMode.OneShot, ChannelSetting channel = ChannelSetting.A0A1Differential, SampleRateSetting sampleRate = SampleRateSetting.Sps1600) diff --git a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1115.cs b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1115.cs index 10eeeb7ba5..a3ea78c160 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1115.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1115.cs @@ -25,7 +25,7 @@ public SampleRateSetting SampleRate } public Ads1115(II2cBus i2cBus, - Address address = Address.Default, + Addresses address = Addresses.Default, MeasureMode mode = MeasureMode.OneShot, ChannelSetting channel = ChannelSetting.A0A1Differential, SampleRateSetting sampleRate = SampleRateSetting.Sps128) diff --git a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.Enums.cs b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.Enums.cs index a85cbe62ef..b742f01b79 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.Enums.cs @@ -5,7 +5,7 @@ public partial class Ads1x15 /// /// Valid addresses for the sensor. /// - public enum Address : byte + public enum Addresses : byte { Address48 = 0x48, Address49 = 0x49, diff --git a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.cs b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.cs index dbd32b7a5a..0afa2766a8 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Driver/ICs.ADC.Ads1x15/Ads1x15.cs @@ -37,7 +37,7 @@ public abstract partial class Ads1x15 : SamplingSensorBase /// /// protected Ads1x15(II2cBus i2cBus, - Address address, + Addresses address, MeasureMode mode, ChannelSetting channel) { diff --git a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Samples/Ads1015_Sample/MeadowApp.cs b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Samples/Ads1015_Sample/MeadowApp.cs index 1365297587..49008cb776 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Samples/Ads1015_Sample/MeadowApp.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.ADC.Ads1x15/Samples/Ads1015_Sample/MeadowApp.cs @@ -20,7 +20,7 @@ void Initialize() Console.WriteLine("Initialize hardware..."); _adc = new Ads1015( Device.CreateI2cBus(Meadow.Hardware.I2cBusSpeed.FastPlus), - Ads1x15.Address.Default, + Ads1x15.Addresses.Default, Ads1x15.MeasureMode.Continuous, Ads1x15.ChannelSetting.A0SingleEnded, Ads1015.SampleRateSetting.Sps3300); diff --git a/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.Enums.cs b/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.Enums.cs index dc744585bf..3a1b3c2519 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.Enums.cs @@ -5,10 +5,16 @@ public partial class At24Cxx /// /// Valid addresses for the sensor. /// - public enum Addresses : byte + public enum Address : byte { - Address0 = 0x50, - Default = Address0 + /// + /// Bus address 0x50 + /// + Address_0x50 = 0x50, + /// + /// Default bus address + /// + Default = Address_0x50 } } } diff --git a/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.cs b/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.cs index 47949394e1..507d3604ec 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.EEPROM.At24Cxx/Driver/ICs.EEPROM.At24Cxx/At24Cxx.cs @@ -30,11 +30,12 @@ public partial class At24Cxx /// /// Create a new AT24Cxx object using the default parameters for the component. /// + /// I2CBus connected to display /// Address of the At24Cxx (default = 0x50). /// Number of bytes in a page (default = 32 - AT24C32). /// Total number of bytes in the EEPROM (default = 8192 - AT24C32). public At24Cxx(II2cBus i2cBus, - byte address = (byte)Addresses.Default, + byte address = (byte)Address.Default, ushort pageSize = 32, ushort memorySize = 8192) { diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ht16k33/Driver/ICs.IOExpanders.Ht16k33/Ht16k33.Enums.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ht16k33/Driver/ICs.IOExpanders.Ht16k33/Ht16k33.Enums.cs index da10dba4ff..c9058dffd3 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ht16k33/Driver/ICs.IOExpanders.Ht16k33/Ht16k33.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Ht16k33/Driver/ICs.IOExpanders.Ht16k33/Ht16k33.Enums.cs @@ -9,15 +9,36 @@ public partial class Ht16k33 /// public enum Addresses : byte { - Address0 = 0x70, - Default = Address0 + /// + /// Bus address 0x70 + /// + Address_0x70 = 0x70, + /// + /// Default bus address + /// + Default = Address_0x70 } + /// + /// Blink rate + /// public enum BlinkRate : byte { + /// + /// Off + /// Off = 0, + /// + /// Fast (2Hz) + /// Fast = 2, //2hz + /// + /// Medium (1Hz) + /// Medium = 4, //1hz + /// + /// Slow (0.5Hz) + /// Slow = 8, //0.5hz } @@ -55,6 +76,5 @@ enum Register : byte HT16K33_DIM = 0xE0, // Set brightness / dimmer HT16K33_DDAP = 0, //display address pointer } - } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Is31fl3731/Driver/ICs.IOExpanders.Is31fl3731/Is31fl3731.Enums.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Is31fl3731/Driver/ICs.IOExpanders.Is31fl3731/Is31fl3731.Enums.cs index b88e5ad8f1..72eebfc15f 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Is31fl3731/Driver/ICs.IOExpanders.Is31fl3731/Is31fl3731.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Is31fl3731/Driver/ICs.IOExpanders.Is31fl3731/Is31fl3731.Enums.cs @@ -7,9 +7,18 @@ public partial class Is31fl3731 /// public enum Addresses : byte { - Address0 = 0x74, - Address1 = 0x77, - Default = Address0 + /// + /// Bus address 0x74 + /// + Address_0x74 = 0x74, + /// + /// Bus address 0x77 + /// + Address_0x77 = 0x77, + /// + /// Default bus address + /// + Default = Address_0x74 } } } diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.Addresses.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.Addresses.cs index 1e4aae3118..5922b3a72b 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.Addresses.cs @@ -5,10 +5,16 @@ public partial class Mcp23x08 /// /// Valid addresses for the sensor. /// - public enum Addresses : byte + public enum Address : byte { - Address0 = 0x20, - Default = Address0 + /// + /// Bus address 0x20 + /// + Address_0x20 = 0x20, + /// + /// Default bus address + /// + Default = Address_0x20 } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.cs index a02b94d589..79cafffe3a 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Mcp23x08/Driver/ICs.IOExpanders.Mcp23x08/Mcp23x08.cs @@ -67,7 +67,8 @@ public Mcp23x08(II2cBus i2cBus, bool pinA0, bool pinA1, bool pinA2, /// /// /// - public Mcp23x08(II2cBus i2cBus, byte address = (byte)Addresses.Default, + /// optional interupt port + public Mcp23x08(II2cBus i2cBus, byte address = (byte)Address.Default, IDigitalInputPort interruptPort = null) : // use the internal constructor that takes an IMcpDeviceComms this(new I2cMcpDeviceComms(i2cBus, address), interruptPort) diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.Enums.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.Enums.cs index c24eceff25..6f1eaa7d97 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.Enums.cs @@ -7,8 +7,14 @@ public partial class Pca9685 /// public enum Addresses : byte { - Address0 = 0x40, - Default = Address0 + /// + /// Bus address 0x44 + /// + Address_0x44 = 0x40, + /// + /// Default bus address + /// + Default = Address_0x44 } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.cs index 7b412b7729..94098b8dde 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Pca9685/Driver/ICs.IOExpanders.Pca9685/Pca9685.cs @@ -38,13 +38,13 @@ public partial class Pca9685 protected const byte mode1AI = 0x21; public II2cBus i2CBus { get; protected set; } - public byte Address { get; protected set; } + byte address; public Pca9685(II2cBus i2cBus, byte address = (byte)Addresses.Default, int frequency = 100) { i2CBus = i2cBus; - Address = address; - i2cPeripheral = new I2cPeripheral(i2CBus, Address); + this.address = address; + i2cPeripheral = new I2cPeripheral(i2CBus, address); this.frequency = frequency; } @@ -53,8 +53,8 @@ public Pca9685(II2cBus i2cBus, byte address = (byte)Addresses.Default, int frequ /// public virtual void Initialize() { - i2CBus.WriteData(Address, Mode1, 0X00); - i2CBus.WriteData(Address, Mode1); + i2CBus.WriteData(address, Mode1, 0X00); + i2CBus.WriteData(address, Mode1); Thread.Sleep(5); @@ -79,7 +79,7 @@ public virtual IPwmPort CreatePwmPort(byte portNumber, float dutyCycle = 0.5f) throw new ArgumentException("Value must be between 0 and 15", "portNumber"); } - var pwmPort = new PwmPort(i2CBus, Address, Led0OnL, frequency, portNumber, dutyCycle); + var pwmPort = new PwmPort(i2CBus, address, Led0OnL, frequency, portNumber, dutyCycle); return pwmPort; } @@ -135,7 +135,7 @@ public virtual void SetPwm(byte pin, int on, int off) protected virtual void Write(byte register, byte ledXOnL, byte ledXOnH, byte ledXOffL, byte ledXOffH) { - i2CBus.WriteData(Address, register, ledXOnL, ledXOnH, ledXOffL, ledXOffH); + i2CBus.WriteData(address, register, ledXOnL, ledXOnH, ledXOffL, ledXOffH); } protected virtual void Write(byte register, byte value) diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.TCA9548A/Tca9548A.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.TCA9548A/Tca9548A.cs index 77ba7bc4dd..d5d6f7c09a 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.TCA9548A/Tca9548A.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.TCA9548A/Tca9548A.cs @@ -12,10 +12,15 @@ namespace Meadow.Foundation.ICs.IOExpanders /// public partial class Tca9548a : II2cPeripheral { - private readonly IReadOnlyDictionary _buses; - private byte _selectedBus = 0xff; + private readonly IReadOnlyDictionary buses; + private byte selectedBus = 0xff; internal SemaphoreSlim BusSelectorSemaphore = new SemaphoreSlim(1, 1); + /// + /// The address of this device on the . + /// + public byte Address { get; } + /// /// Create a i2c multiplexer /// @@ -34,7 +39,7 @@ public Tca9548a(II2cBus bus, byte address = (byte)Addresses.Default) Bus = bus ?? throw new ArgumentNullException(nameof(bus), "The bus cannot be null."); - _buses = Enumerable.Range(0, 8) + buses = Enumerable.Range(0, 8) .Select(Convert.ToByte) .ToDictionary( b => b, @@ -44,22 +49,17 @@ public Tca9548a(II2cBus bus, byte address = (byte)Addresses.Default) /// /// Create a i2c multiplexer. /// - /// The the device is attached to + /// The the device is attached to /// The logic high/low state of pin A0 /// The logic high/low state of pin A1 /// The logic high/low state of pin A2 /// The device address was invalid /// The bus was null - public Tca9548a(II2cBus bus, bool a0, bool a1, bool a2) - : this(bus, TcaAddressTable.GetAddressFromPins(a0, a1, a2)) + public Tca9548a(II2cBus i2cBus, bool a0, bool a1, bool a2) + : this(i2cBus, TcaAddressTable.GetAddressFromPins(a0, a1, a2)) { } - /// - /// The address of this device on the . - /// - public byte Address { get; } - /// /// The this device is connected to. /// @@ -68,42 +68,42 @@ public Tca9548a(II2cBus bus, bool a0, bool a1, bool a2) /// /// The connected to SD0/SC0 /// - public II2cBus Bus0 => _buses[0]; + public II2cBus Bus0 => buses[0]; /// /// The connected to SD1/SC1 /// - public II2cBus Bus1 => _buses[1]; + public II2cBus Bus1 => buses[1]; /// /// The connected to SD2/SC2 /// - public II2cBus Bus2 => _buses[2]; + public II2cBus Bus2 => buses[2]; /// /// The connected to SD3/SC3 /// - public II2cBus Bus3 => _buses[3]; + public II2cBus Bus3 => buses[3]; /// /// The connected to SD4/SC4 /// - public II2cBus Bus4 => _buses[4]; + public II2cBus Bus4 => buses[4]; /// /// The connected to SD5/SC5 /// - public II2cBus Bus5 => _buses[5]; + public II2cBus Bus5 => buses[5]; /// /// The connected to SD6/SC6 /// - public II2cBus Bus6 => _buses[6]; + public II2cBus Bus6 => buses[6]; /// /// The connected to SD7/SC7 /// - public II2cBus Bus7 => _buses[7]; + public II2cBus Bus7 => buses[7]; /// /// Activate the specified bus @@ -111,7 +111,7 @@ public Tca9548a(II2cBus bus, bool a0, bool a1, bool a2) /// internal void SelectBus(byte busIndex) { - if (_selectedBus == busIndex) + if (this.selectedBus == busIndex) { return; } @@ -123,7 +123,7 @@ internal void SelectBus(byte busIndex) throw new Exception( $"Failed to switch to the desired bus. Expected {@byte:X8} got {selectedBus:X8}"); - _selectedBus = busIndex; + this.selectedBus = busIndex; } diff --git a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.Tca9548a/Tca9548A.Addresses.cs b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.Tca9548a/Tca9548A.Addresses.cs index de184454ca..8f35330ca3 100644 --- a/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.Tca9548a/Tca9548A.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/ICs.IOExpanders.Tca9548a/Driver/ICs.IOExpanders.Tca9548a/Tca9548A.Addresses.cs @@ -7,8 +7,14 @@ public partial class Tca9548a /// public enum Addresses : byte { - Address0 = 0x70, - Default = Address0 + /// + /// Bus address 0x70 + /// + Address_0x70 = 0x70, + /// + /// Default bus address + /// + Default = Address_0x70 } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.Enums.cs b/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.Enums.cs index 28381b5132..e7de4862a6 100644 --- a/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.Enums.cs @@ -5,10 +5,16 @@ public partial class Ds1307 /// /// Valid addresses for the sensor. /// - public enum Addresses : byte + public enum Address : byte { - Address0 = 0x68, - Default = Address0 + /// + /// Bus address 0x68 + /// + Address_0x68 = 0x68, + /// + /// Default bus address + /// + Default = Address_0x68 } public enum SquareWaveFrequency @@ -21,4 +27,4 @@ public enum SquareWaveFrequency Wave_High } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.cs b/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.cs index aa326f6832..17445a7f97 100644 --- a/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.cs +++ b/Source/Meadow.Foundation.Peripherals/RTCs.Ds1307/Driver/RTCs.Ds1307/Ds1307.cs @@ -23,13 +23,13 @@ public bool IsRunning get { // read 1 byte starting from 0x00 - var reg = i2cBus.WriteReadData((byte)Addresses.Default, 0x01, 0x00); + var reg = i2cBus.WriteReadData((byte)Address.Default, 0x01, 0x00); return (reg[0] & (1 << 7)) != 0; } set { // read the seconds register - var reg = i2cBus.WriteReadData((byte)Addresses.Default, 0x01, 0x00); + var reg = i2cBus.WriteReadData((byte)Address.Default, 0x01, 0x00); var current = (reg[0] & (1 << 7)) != 0; if ((value && current) || (!value && !current)) return; @@ -44,14 +44,14 @@ public bool IsRunning } // and write it back to register 0x00 - i2cBus.WriteData((byte)Addresses.Default, 0x00, reg[0]); + i2cBus.WriteData((byte)Address.Default, 0x00, reg[0]); } } public DateTime GetTime() { // read 7 bytes starting from 0x00 - var data = i2cBus.WriteReadData((byte)Addresses.Default, 0x07, 0x00); + var data = i2cBus.WriteReadData((byte)Address.Default, 0x07, 0x00); return FromRTCTime(data); } @@ -61,7 +61,7 @@ public void SetTime(DateTime time) data.Add(0); // target start register offset data.AddRange(ToRTCTime(time)); - i2cBus.Write((byte)Addresses.Default, data.ToArray()); + i2cBus.Write((byte)Address.Default, data.ToArray()); } /// @@ -73,7 +73,7 @@ public void SetTime(DateTime time) public byte[] ReadRAM(int offset, int count) { // RAM starts at register offset 8 - return i2cBus.WriteReadData((byte)Addresses.Default, count, (byte)(0x08 + offset)); + return i2cBus.WriteReadData((byte)Address.Default, count, (byte)(0x08 + offset)); } /// @@ -87,7 +87,7 @@ public void WriteRAM(int offset, params byte[] data) d.Add((byte)(0x08 + offset)); // target start register offset d.AddRange(data); - i2cBus.Write((byte)Addresses.Default, d.ToArray()); + i2cBus.Write((byte)Address.Default, d.ToArray()); } public void SquareWaveOutput(SquareWaveFrequency freq) @@ -119,7 +119,7 @@ public void SquareWaveOutput(SquareWaveFrequency freq) } // control register is at 0x07 - i2cBus.WriteData((byte)Addresses.Default, 0x07, registerData); + i2cBus.WriteData((byte)Address.Default, 0x07, registerData); } private static byte ToBCD(ushort i) diff --git a/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.Enums.cs b/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.Enums.cs index c966a5210b..a413869569 100644 --- a/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.Enums.cs @@ -5,10 +5,16 @@ public partial class Ds3231 : Ds323x /// /// Valid addresses for the sensor. /// - public enum Addresses : byte + public enum Address : byte { - Address0 = 0x68, - Default = Address0 + /// + /// Bus address 0x68 + /// + Address_0x68 = 0x68, + /// + /// Default bus address + /// + Default = Address_0x68 } } } diff --git a/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.cs b/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.cs index 13f9537bf1..9914abfea4 100644 --- a/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.cs +++ b/Source/Meadow.Foundation.Peripherals/RTCs.Ds323x/Driver/RTCs.Ds323x/Ds3231.cs @@ -18,7 +18,7 @@ public Ds3231( IDigitalInputController device, II2cBus i2cBus, IPin interruptPin = null, - byte address = (byte)Addresses.Default) + byte address = (byte)Address.Default) : base(new I2cPeripheral(i2cBus, address), device, interruptPin) { } @@ -33,7 +33,7 @@ public Ds3231( public Ds3231( II2cBus i2cBus, IDigitalInputPort interruptPort = null, - byte address = (byte)Addresses.Default) + byte address = (byte)Address.Default) : base(new I2cPeripheral(i2cBus, address), interruptPort) { } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.AdafruitMPRLS/Driver/Sensors.Atmospheric.AdafruitMPRLS/AdafruitMPRLS.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.AdafruitMPRLS/Driver/Sensors.Atmospheric.AdafruitMPRLS/AdafruitMPRLS.Enums.cs index f3af07676d..47fc3e2a4b 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.AdafruitMPRLS/Driver/Sensors.Atmospheric.AdafruitMPRLS/AdafruitMPRLS.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.AdafruitMPRLS/Driver/Sensors.Atmospheric.AdafruitMPRLS/AdafruitMPRLS.Enums.cs @@ -7,8 +7,14 @@ public partial class AdafruitMPRLS /// public enum Addresses : byte { - Address0 = 0x18, - Default = Address0 + /// + /// Bus address 0x18 + /// + Address_0x18 = 0x18, + /// + /// Default bus address + /// + Default = Address_0x18 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme280/Driver/Sensors.Atmospheric.Bme280/Bme280.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme280/Driver/Sensors.Atmospheric.Bme280/Bme280.Addresses.cs index 3297633e24..3424e1f797 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme280/Driver/Sensors.Atmospheric.Bme280/Bme280.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme280/Driver/Sensors.Atmospheric.Bme280/Bme280.Addresses.cs @@ -7,9 +7,18 @@ public partial class Bme280 /// public enum Addresses : byte { - Address0 = 0x76, - Address1 = 0x77, - Default = Address0 + /// + /// Bus address 0x76 + /// + Address_0x76 = 0x76, + /// + /// Bus address 0x77 + /// + Address_0x77 = 0x77, + /// + /// Default bus address + /// + Default = Address_0x76 } } } \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme680/Driver/Sensors.Atmospheric.Bme680/Bme680.RegisterAddresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme680/Driver/Sensors.Atmospheric.Bme680/Bme680.RegisterAddresses.cs index f988410ab8..9fdbf306ab 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme680/Driver/Sensors.Atmospheric.Bme680/Bme680.RegisterAddresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bme680/Driver/Sensors.Atmospheric.Bme680/Bme680.RegisterAddresses.cs @@ -7,9 +7,18 @@ public partial class Bme680 /// public enum Addresses : byte { - Address0 = 0x77, - Address1 = 0x76, - Default = Address0 + /// + /// Bus address 0x77 + /// + Address_0x77 = 0x77, + /// + /// Bus address 0x76 + /// + Address_0x76 = 0x76, + /// + /// Default bus address + /// + Default = Address_0x77 } internal class RegisterAddresses diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp085/Driver/Sensors.Atmospheric.Bmp085/Bmp085.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp085/Driver/Sensors.Atmospheric.Bmp085/Bmp085.Enums.cs index 687e80a0ff..95802772a4 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp085/Driver/Sensors.Atmospheric.Bmp085/Bmp085.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp085/Driver/Sensors.Atmospheric.Bmp085/Bmp085.Enums.cs @@ -7,8 +7,14 @@ public partial class Bmp085 /// public enum Addresses : byte { - Address0 = 0x77, - Default = Address0 + /// + /// Bus address 0x77 + /// + Address_0x77 = 0x77, + /// + /// Default bus address + /// + Default = Address_0x77 } public enum DeviceMode diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp180/Driver/Sensors.Atmospheric.Bmp180/Bmp180.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp180/Driver/Sensors.Atmospheric.Bmp180/Bmp180.Enums.cs index 134a44ff81..a129b9c2f0 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp180/Driver/Sensors.Atmospheric.Bmp180/Bmp180.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Bmp180/Driver/Sensors.Atmospheric.Bmp180/Bmp180.Enums.cs @@ -7,8 +7,14 @@ public partial class Bmp180 /// public enum Addresses : byte { - Address0 = 0x77, - Default = Address0 + /// + /// Bus address 0x77 + /// + Address_0x77 = 0x77, + /// + /// Default bus address + /// + Default = Address_0x77 } public enum DeviceMode diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.Enums.cs index 303438c985..401d3b253e 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.Enums.cs @@ -5,7 +5,7 @@ public partial class Ccs811 /// /// Valid addresses for the sensor. /// - public enum Address : byte + public enum Addresses : byte { /// /// Bus address 0x5A diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.cs index 8289d7cbfc..939109a8cc 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ccs811/Driver/Sensors.Atmospheric.Ccs811/Ccs811.cs @@ -39,7 +39,7 @@ public partial class Ccs811 : /// public Concentration? Voc => Conditions.Voc; - public Ccs811(II2cBus i2cBus, Address address = Address.Default) + public Ccs811(II2cBus i2cBus, Addresses address = Addresses.Default) : this(i2cBus, (byte)address) { } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Dhtxx/Driver/Sensors.Atmospheric.Dhtxx/DhtBase.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Dhtxx/Driver/Sensors.Atmospheric.Dhtxx/DhtBase.Enums.cs index 46f44bfa9c..1b5671dc76 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Dhtxx/Driver/Sensors.Atmospheric.Dhtxx/DhtBase.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Dhtxx/Driver/Sensors.Atmospheric.Dhtxx/DhtBase.Enums.cs @@ -12,8 +12,14 @@ public abstract partial class DhtBase /// public enum Addresses : byte { - Address0 = 0x5C, - Default = Address0 + /// + /// Bus address 0x5C + /// + Address_0x5C = 0x5C, + /// + /// Default bus address + /// + Default = Address_0x5C } private enum BusType diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Hih6130/Driver/Sensors.Atmospheric.Hih6130/Hih6130.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Hih6130/Driver/Sensors.Atmospheric.Hih6130/Hih6130.Enums.cs index 24c56f51b3..9992100e04 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Hih6130/Driver/Sensors.Atmospheric.Hih6130/Hih6130.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Hih6130/Driver/Sensors.Atmospheric.Hih6130/Hih6130.Enums.cs @@ -7,8 +7,14 @@ public partial class Hih6130 /// public enum Addresses : byte { - Address0 = 0x27, - Default = Address0 + /// + /// Bus address 0x27 + /// + Address_0x27 = 0x27, + /// + /// Default bus address + /// + Default = Address_0x27 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Htu21d/Driver/Sensors.Atmospheric.Htu21d/Htu21d.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Htu21d/Driver/Sensors.Atmospheric.Htu21d/Htu21d.Enums.cs index 63f346b82c..810272c07c 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Htu21d/Driver/Sensors.Atmospheric.Htu21d/Htu21d.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Htu21d/Driver/Sensors.Atmospheric.Htu21d/Htu21d.Enums.cs @@ -9,8 +9,14 @@ public partial class Htu21d /// public enum Addresses : byte { - Address0 = 0x40, - Default = Address0 + /// + /// Bus address 0x40 + /// + Address_0x40 = 0x40, + /// + /// Default bus address + /// + Default = Address_0x40 } private const byte SOFT_RESET = 0xFE; diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl115a2/Driver/Sensors.Atmospheric.Mpl115a2/Mpl115a2.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl115a2/Driver/Sensors.Atmospheric.Mpl115a2/Mpl115a2.Addresses.cs index 3a9ae13944..58dd7f18bd 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl115a2/Driver/Sensors.Atmospheric.Mpl115a2/Mpl115a2.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl115a2/Driver/Sensors.Atmospheric.Mpl115a2/Mpl115a2.Addresses.cs @@ -7,8 +7,14 @@ public partial class Mpl115a2 /// public enum Addresses : byte { - Address0 = 0x60, - Default = Address0 + /// + /// Bus address 0x60 + /// + Address_0x60 = 0x60, + /// + /// Default bus address + /// + Default = Address_0x60 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl3115a2/Driver/Sensors.Atmospheric.Mpl3115a2/Mpl3115a2.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl3115a2/Driver/Sensors.Atmospheric.Mpl3115a2/Mpl3115a2.Addresses.cs index a422121ad0..e06db231e0 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl3115a2/Driver/Sensors.Atmospheric.Mpl3115a2/Mpl3115a2.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Mpl3115a2/Driver/Sensors.Atmospheric.Mpl3115a2/Mpl3115a2.Addresses.cs @@ -7,8 +7,14 @@ public partial class Mpl3115a2 /// public enum Addresses : byte { - Address0 = 0x60, - Default = Address0 + /// + /// Bus address 0x60 + /// + Address_0x60 = 0x60, + /// + /// Default bus address + /// + Default = Address_0x60 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ms5611/Driver/Sensors.Atmospheric.Ms5611/Ms5611.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ms5611/Driver/Sensors.Atmospheric.Ms5611/Ms5611.Enums.cs index 7e0b737db8..06bad256d9 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ms5611/Driver/Sensors.Atmospheric.Ms5611/Ms5611.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Ms5611/Driver/Sensors.Atmospheric.Ms5611/Ms5611.Enums.cs @@ -7,8 +7,14 @@ public partial class Ms5611 /// public enum Addresses : byte { - Address0 = 0x5C, - Default = Address0 + /// + /// Bus address 0x5C + /// + Address_0x5C = 0x5C, + /// + /// Default bus address + /// + Default = Address_0x5C } public enum Resolution diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Sht31D/Driver/Sensors.Atmospheric.Sht31d/Sht31d.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Sht31D/Driver/Sensors.Atmospheric.Sht31d/Sht31d.Enums.cs index ca2b65f7d7..6031e1f11a 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Sht31D/Driver/Sensors.Atmospheric.Sht31d/Sht31d.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Atmospheric.Sht31D/Driver/Sensors.Atmospheric.Sht31d/Sht31d.Enums.cs @@ -7,9 +7,18 @@ public partial class Sht31d /// public enum Addresses : byte { - Address0 = 0x44, - Address1 = 0x45, - Default = Address0 + /// + /// Bus address 0x44 + /// + Address_0x44 = 0x44, + /// + /// Bus address 0x45 + /// + Address_0x45 = 0x45, + /// + /// Default bus address + /// + Default = Address_0x44 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Camera.ArducamMini/Driver/Sensors.Camera.ArducamMini/ArducamMini.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Camera.ArducamMini/Driver/Sensors.Camera.ArducamMini/ArducamMini.Enums.cs index b520819ecf..fe1a7b1791 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Camera.ArducamMini/Driver/Sensors.Camera.ArducamMini/ArducamMini.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Camera.ArducamMini/Driver/Sensors.Camera.ArducamMini/ArducamMini.Enums.cs @@ -7,8 +7,14 @@ public partial class ArducamMini /// public enum Addresses : byte { - Address0 = 0x30, - Default = Address0 + /// + /// Bus address 0x30 + /// + Address_0x30 = 0x30, + /// + /// Default bus address + /// + Default = Address_0x30 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Camera.Mlx90640/Driver/Sensors.Camera.Mlx90640/Mlx90640.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Camera.Mlx90640/Driver/Sensors.Camera.Mlx90640/Mlx90640.Enums.cs index b121c62f3a..5988bd7bf9 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Camera.Mlx90640/Driver/Sensors.Camera.Mlx90640/Mlx90640.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Camera.Mlx90640/Driver/Sensors.Camera.Mlx90640/Mlx90640.Enums.cs @@ -7,8 +7,14 @@ public partial class Mlx90640 /// public enum Addresses : byte { - Address0 = 0x33, - Default = Address0 + /// + /// Bus address 0x33 + /// + Address_0x33 = 0x33, + /// + /// Default bus address + /// + Default = Address_0x33 } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Distance.Vl53l0x/Driver/Sensors.Distance.Vl53l0x/Vl53l0x.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Distance.Vl53l0x/Driver/Sensors.Distance.Vl53l0x/Vl53l0x.Enums.cs index cfdd956bd2..a5c4988b71 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Distance.Vl53l0x/Driver/Sensors.Distance.Vl53l0x/Vl53l0x.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Distance.Vl53l0x/Driver/Sensors.Distance.Vl53l0x/Vl53l0x.Enums.cs @@ -10,8 +10,14 @@ public partial class Vl53l0x /// public enum Addresses : byte { - Address0 = 0x29, - Default = Address0 + /// + /// Bus address 0x29 + /// + Address_0x29 = 0x29, + /// + /// Default bus address + /// + Default = Address_0x29 } public enum UnitType diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Ags01Db/Driver/Sensors.Environmental.Ags01Db/Ags01Db.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Ags01Db/Driver/Sensors.Environmental.Ags01Db/Ags01Db.Enums.cs index 065e5974a5..647383a0ff 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Ags01Db/Driver/Sensors.Environmental.Ags01Db/Ags01Db.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Environmental.Ags01Db/Driver/Sensors.Environmental.Ags01Db/Ags01Db.Enums.cs @@ -12,8 +12,14 @@ public partial class Ags01Db /// public enum Addresses : byte { - Address0 = 0x11, - Default = Address0 + /// + /// Bus address 0x11 + /// + Address_0x11 = 0x11, + /// + /// Default bus address + /// + Default = Address_0x11 } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.BBQ10Keyboard/Driver/Sensors.Hid.BBQ10Keyboard/BBQ10Keyboard.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.BBQ10Keyboard/Driver/Sensors.Hid.BBQ10Keyboard/BBQ10Keyboard.Enums.cs index 09ee253a9a..1996988cd8 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.BBQ10Keyboard/Driver/Sensors.Hid.BBQ10Keyboard/BBQ10Keyboard.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.BBQ10Keyboard/Driver/Sensors.Hid.BBQ10Keyboard/BBQ10Keyboard.Enums.cs @@ -10,10 +10,19 @@ public enum KeyState StateRelease } + /// + /// Valid addresses for the sensor. + /// public enum Addresses : byte { - Default = Address0, - Address0 = 0x1F, + /// + /// Bus address 0x1F + /// + Address_0x1F = 0x1F, + /// + /// Default bus address + /// + Default = Address_0x1F } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Mpr121/Driver/Sensors.Hid.Mpr121/Mpr121.enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Mpr121/Driver/Sensors.Hid.Mpr121/Mpr121.enums.cs index 7d68e38dc5..139b3a9a4d 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Mpr121/Driver/Sensors.Hid.Mpr121/Mpr121.enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Mpr121/Driver/Sensors.Hid.Mpr121/Mpr121.enums.cs @@ -8,8 +8,14 @@ public partial class Mpr121 /// public enum Addresses : byte { - Address0 = 0x5A, - Default = Address0 + /// + /// Bus address 0x5A + /// + Address_0x5A = 0x5A, + /// + /// Default bus address + /// + Default = Address_0x5A } /// diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Tsc2004/Driver/Sensors.Hid.Tsc2004/Tsc2004.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Tsc2004/Driver/Sensors.Hid.Tsc2004/Tsc2004.Enums.cs index 093cb48866..e3eb3778df 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Tsc2004/Driver/Sensors.Hid.Tsc2004/Tsc2004.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Hid.Tsc2004/Driver/Sensors.Hid.Tsc2004/Tsc2004.Enums.cs @@ -2,10 +2,19 @@ { public partial class Tsc2004 { + /// + /// Valid addresses for the sensor. + /// public enum Addresses : byte { - Default = Address0, - Address0 = 0x4B, + /// + /// Bus address 0x4B + /// + Address_0x4B = 0x4B, + /// + /// Default bus address + /// + Default = Address_0x4B } } } \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1745/Driver/Sensors.Light.Bh1745/Bh1745.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1745/Driver/Sensors.Light.Bh1745/Bh1745.Addresses.cs index 9289b079ea..568b66ae2c 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1745/Driver/Sensors.Light.Bh1745/Bh1745.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1745/Driver/Sensors.Light.Bh1745/Bh1745.Addresses.cs @@ -10,12 +10,15 @@ public enum Addresses : byte /// /// Address of the peripheral when the address pin is pulled low. /// - Address0 = 0x38, + Address_0x38 = 0x38, /// /// Address of the peripheral when the address pin is pulled high. /// - Address1 = 0x39, - Default = Address0 + Address_0x39 = 0x39, + /// + /// Defulat bus address + /// + Default = Address_0x38 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1750/Driver/Sensors.Light.Bh1750/Bh1750.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1750/Driver/Sensors.Light.Bh1750/Bh1750.Addresses.cs index dd9d7382e0..513a9d72cc 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1750/Driver/Sensors.Light.Bh1750/Bh1750.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Bh1750/Driver/Sensors.Light.Bh1750/Bh1750.Addresses.cs @@ -10,12 +10,15 @@ public enum Addresses : byte /// /// Address of the peripheral when the address pin is pulled low. /// - Address0 = 0x5C, + Address_0x5C = 0x5C, /// /// Address of the peripheral when the address pin is pulled high. /// - Address1 = 0x23, - Default = Address0 + Address_0x23 = 0x23, + /// + /// Default bus address + /// + Default = Address_0x5C } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Max44009/Driver/Sensors.Light.Max44009/Max44009.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Max44009/Driver/Sensors.Light.Max44009/Max44009.Enums.cs index db66e60c16..5dba9b3a90 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Max44009/Driver/Sensors.Light.Max44009/Max44009.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Max44009/Driver/Sensors.Light.Max44009/Max44009.Enums.cs @@ -7,9 +7,18 @@ public partial class Max44009 /// public enum Addresses : byte { - Address0 = 0x4A, - Address1 = 0x4B, - Default = Address0 + /// + /// Bus address 0x4A + /// + Address_0x4A = 0x4A, + /// + /// Bus address 0x4B + /// + Address_0x4B = 0x4B, + /// + /// Default bus address + /// + Default = Address_0x4A } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Si1145/Driver/Sensors.Light.Si1145/Si1145.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Si1145/Driver/Sensors.Light.Si1145/Si1145.Addresses.cs index 2d0564234b..d76ab92e54 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Si1145/Driver/Sensors.Light.Si1145/Si1145.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Si1145/Driver/Sensors.Light.Si1145/Si1145.Addresses.cs @@ -7,8 +7,14 @@ public partial class Si1145 /// public enum Addresses : byte { - Address0 = 0x60, - Default = Address0 + /// + /// Bus address 0x60 + /// + Address_0x60 = 0x60, + /// + /// Default bus address + /// + Default = Address_0x60 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tcs3472x/Driver/Sensors.Light.Tcs3472x/Tcs3472x.enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tcs3472x/Driver/Sensors.Light.Tcs3472x/Tcs3472x.enums.cs index efbec6f4f8..f94af6419c 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tcs3472x/Driver/Sensors.Light.Tcs3472x/Tcs3472x.enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tcs3472x/Driver/Sensors.Light.Tcs3472x/Tcs3472x.enums.cs @@ -7,8 +7,14 @@ public partial class Tcs3472x /// public enum Addresses : byte { - Address0 = 0x29, - Default = Address0 + /// + /// Bus address 0x29 + /// + Address_0x29 = 0x29, + /// + /// Default bus address + /// + Default = Address_0x29 } /// diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tsl2591/Driver/Sensors.Light.Tsl2591/Tsl2591.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tsl2591/Driver/Sensors.Light.Tsl2591/Tsl2591.Enums.cs index ab547bd224..102430bbb0 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tsl2591/Driver/Sensors.Light.Tsl2591/Tsl2591.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Tsl2591/Driver/Sensors.Light.Tsl2591/Tsl2591.Enums.cs @@ -18,8 +18,14 @@ public partial class Tsl2591 /// public enum Addresses : byte { - Address0 = 0x29, - Default = Address0 + /// + /// Bus address 0x29 + /// + Address_0x29 = 0x29, + /// + /// Default bus address + /// + Default = Address_0x29 } [Flags] diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Veml7700/Driver/Sensors.Light.Veml7700/Veml7700.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Veml7700/Driver/Sensors.Light.Veml7700/Veml7700.Addresses.cs index 03cb752cf5..05ca4ccb2a 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Light.Veml7700/Driver/Sensors.Light.Veml7700/Veml7700.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Light.Veml7700/Driver/Sensors.Light.Veml7700/Veml7700.Addresses.cs @@ -7,8 +7,14 @@ public partial class Veml7700 /// public enum Addresses : byte { - Address0 = 0x10, - Default = Address0 + /// + /// Bus address 0x10 + /// + Address_0x10 = 0x10, + /// + /// Default bus address + /// + Default = Address_0x10 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.LoadCell.Nau7802/Driver/Sensors.LoadCell.Nau7802/Nau7802.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.LoadCell.Nau7802/Driver/Sensors.LoadCell.Nau7802/Nau7802.Enums.cs index bb566d5e5f..1801666f0b 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.LoadCell.Nau7802/Driver/Sensors.LoadCell.Nau7802/Nau7802.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.LoadCell.Nau7802/Driver/Sensors.LoadCell.Nau7802/Nau7802.Enums.cs @@ -8,8 +8,14 @@ public partial class Nau7802 /// public enum Addresses : byte { - Address0 = 0x2A, - Default = Address0 + /// + /// Bus address 0x2A + /// + Address_0x2A = 0x2A, + /// + /// Default bus address + /// + Default = Address_0x2A } private enum CTRL2_BITS : byte diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345.cs index 552f4f04b2..a3ec0e318d 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345.cs @@ -67,7 +67,7 @@ public sbyte OffsetZ /// /// Address of the I2C sensor /// I2C bus - public Adxl345(II2cBus i2cBus, Address address = Address.Default) + public Adxl345(II2cBus i2cBus, Addresses address = Addresses.Default) : this(i2cBus, (byte)address) { } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345_Extras/Adxl345.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345_Extras/Adxl345.Addresses.cs index 90ea9f9e18..b811c02dcd 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345_Extras/Adxl345.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Adxl3xx/Driver/Sensors.Motion.Adxl3xx/Drivers/Adxl345_Extras/Adxl345.Addresses.cs @@ -5,7 +5,7 @@ public partial class Adxl345 /// /// Valid addresses for the sensor. /// - public enum Address : byte + public enum Addresses : byte { /// /// Bus address 0x53 diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Apds9960/Driver/Sensors.Motion.Apds9960/Apds9960.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Apds9960/Driver/Sensors.Motion.Apds9960/Apds9960.Addresses.cs index 3ee22d55a1..2a1f511e5c 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Apds9960/Driver/Sensors.Motion.Apds9960/Apds9960.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Apds9960/Driver/Sensors.Motion.Apds9960/Apds9960.Addresses.cs @@ -11,8 +11,14 @@ public partial class Apds9960 /// public enum Addresses : byte { - Address0 = 0x39, - Default = Address0 + /// + /// Bus address 0x39 + /// + Address_0x39 = 0x39, + /// + /// Default bus address + /// + Default = Address_0x39 } } } \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.Enums.cs index 0680235e0a..85adcdc8f9 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.Enums.cs @@ -5,7 +5,7 @@ public partial class Bno055 /// /// Valid addresses for the sensor. /// - public enum Address : byte + public enum Addresses : byte { /// /// Bus address 0x28 diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.cs index df4257f4c2..9b904f4e67 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Bno055/Driver/Sensors.Motion.Bno055/Bno055.cs @@ -236,7 +236,7 @@ public bool IsFullyCalibrated /// /// Address of the BNO055 (default = 0x28). /// I2C bus (default = 400 KHz). - public Bno055(II2cBus i2cBus, Address address = Address.Default) + public Bno055(II2cBus i2cBus, Addresses address = Addresses.Default) : this(i2cBus, (byte)address) { diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Hmc5883.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Hmc5883.Addresses.cs index 44ef52f0a8..269a106ca0 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Hmc5883.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Hmc5883.Addresses.cs @@ -7,10 +7,26 @@ public partial class Hmc5883 /// public enum Addresses : byte { - Address0 = 0x1E, - Address1 = 0x0D, - Default = Address0, - Amc5883 = Address1, + /// + /// Bus address 0x1E + /// + Address_0x1E = 0x1E, + /// + /// Bus address 0x0D + /// + Address_0x0D = 0x0D, + /// + /// Default bus address for Hmc5883 + /// + Default = Address_0x1E, + /// + /// Default bus address for Hmc5883 + /// + Hmc5883 = Address_0x1E, + /// + /// Default bus address for Amc5883 + /// + Qmc5883 = Address_0x0D, } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Qmc5883.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Qmc5883.cs index e2942661a5..c0a48d16c4 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Qmc5883.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Hmc5883/Driver/Sensors.Motion.Hmc5883/Qmc5883.cs @@ -8,7 +8,7 @@ namespace Meadow.Foundation.Sensors.Motion { public class Qmc5883 : Hmc5883 { - public Qmc5883(II2cBus i2cBus, byte address = (byte)Addresses.Address1, + public Qmc5883(II2cBus i2cBus, byte address = (byte)Addresses.Qmc5883, GainLevels gain = GainLevels.Gain1090, MeasuringModes measuringMode = MeasuringModes.Continuous, DataOutputRates outputRate = DataOutputRates.Rate15, diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mag3110/Driver/Sensors.Motion.Mag3110/Mag3110.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mag3110/Driver/Sensors.Motion.Mag3110/Mag3110.Addresses.cs index 20b981120f..a48c4c7484 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mag3110/Driver/Sensors.Motion.Mag3110/Mag3110.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mag3110/Driver/Sensors.Motion.Mag3110/Mag3110.Addresses.cs @@ -7,9 +7,18 @@ public partial class Mag3110 /// public enum Addresses : byte { - Address0 = 0x0E, - Address1 = 0x0F, - Default = Address0 + /// + /// Bus address 0x0E + /// + Address_0x0E = 0x0E, + /// + /// Bus address 0x0F + /// + Address_0x0F = 0x0F, + /// + /// Default bus address + /// + Default = Address_0x0E } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.Addresses.cs index 3600a1c905..55c91483a6 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.Addresses.cs @@ -5,7 +5,7 @@ public partial class Mpu6050 /// /// Valid addresses for the sensor. /// - public enum Address : byte + public enum Addresses : byte { /// /// Bus address 0x68 diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.cs index d19d2893d0..7d397bff22 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Motion.Mpu6050/Driver/Sensors.Motion.Mpu6050/Mpu6050.cs @@ -30,11 +30,20 @@ public partial class Mpu6050 : private int GyroScale { get; set; } private int AccelerometerScale { get; set; } + /// + /// Acceleration 3D + /// public Acceleration3D? Acceleration3D => Conditions.Acceleration3D; + /// + /// Angualr acceleration 3D + /// public AngularVelocity3D? AngularVelocity3D => Conditions.AngularVelocity3D; + /// + /// Temperature + /// public Units.Temperature? Temperature => Conditions.Temperature; - public Mpu6050(II2cBus i2cBus, Address address = Address.Default) + public Mpu6050(II2cBus i2cBus, Addresses address = Addresses.Default) : this(i2cBus, (byte)address) { } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.Enums.cs index 1804182bd9..982fe112bd 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.Enums.cs @@ -12,9 +12,18 @@ public partial class Ina260 /// public enum Addresses : byte { - Address0 = 0x40, - Address1 = 0x41, - Default = Address0 + /// + /// Bus address 0x40 + /// + Address_0x40 = 0x40, + /// + /// Bus address 0x41 + /// + Address_0x41 = 0x41, + /// + /// Default bus address + /// + Default = Address_0x40 } private enum Register : byte diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.cs index 4b829bb35e..9d2f58032f 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Power.Ina260/Driver/Sensors.Power.Ina260/Ina260.cs @@ -38,8 +38,8 @@ public Ina260(II2cBus i2cBus, { switch (address) { - case (byte)Addresses.Address0: - case (byte)Addresses.Address1: + case (byte)Addresses.Address_0x40: + case (byte)Addresses.Address_0x41: // valid; break; default: diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Lm75/Driver/Sensors.Temperature.Lm75/Lm75.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Lm75/Driver/Sensors.Temperature.Lm75/Lm75.Addresses.cs index b539274b3d..2818e1c126 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Lm75/Driver/Sensors.Temperature.Lm75/Lm75.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Lm75/Driver/Sensors.Temperature.Lm75/Lm75.Addresses.cs @@ -7,8 +7,14 @@ public partial class Lm75 /// public enum Addresses : byte { - Address0 = 0x48, - Default = Address0 + /// + /// Bus address 0x48 + /// + Address_0x48 = 0x48, + /// + /// Default bus address + /// + Default = Address_0x48 } } } diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Mcp9808/Driver/Sensors.Temperature.Mcp9808/Mcp9808.Enums.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Mcp9808/Driver/Sensors.Temperature.Mcp9808/Mcp9808.Enums.cs index 8a288c196f..ec451d4113 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Mcp9808/Driver/Sensors.Temperature.Mcp9808/Mcp9808.Enums.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Mcp9808/Driver/Sensors.Temperature.Mcp9808/Mcp9808.Enums.cs @@ -7,8 +7,14 @@ public partial class Mcp9808 /// public enum Addresses : byte { - Address0 = 0x18, - Default = Address0 + /// + /// Bus address 0x18 + /// + Address_0x18 = 0x18, + /// + /// Default bus address + /// + Default = Address_0x18 } } -} +} \ No newline at end of file diff --git a/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Tmp102/Driver/Sensors.Temperature.Tmp102/Tmp102.Addresses.cs b/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Tmp102/Driver/Sensors.Temperature.Tmp102/Tmp102.Addresses.cs index ce44fb6324..35aeeaa396 100644 --- a/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Tmp102/Driver/Sensors.Temperature.Tmp102/Tmp102.Addresses.cs +++ b/Source/Meadow.Foundation.Peripherals/Sensors.Temperature.Tmp102/Driver/Sensors.Temperature.Tmp102/Tmp102.Addresses.cs @@ -7,8 +7,14 @@ public partial class Tmp102 /// public enum Addresses : byte { - Address0 = 0x48, - Default = Address0 + /// + /// Bus address 0x48 + /// + Address_0x48 = 0x48, + /// + /// Default bus address + /// + Default = Address_0x48 } } -} +} \ No newline at end of file