/// <summary> /// Initializes a new instance of the <see cref="Pca9554"/> class. /// </summary> /// <param name="i2c">The I2C master device.</param> /// <param name="slaveAddress">The bus address of the I2C device.</param> public Pca9554(IFt4222I2cMaster i2c, int slaveAddress) : base(i2c, slaveAddress) { if (i2c == null) { throw new ArgumentNullException(nameof(i2c)); } if (i2c.FrequencyKbps > 400) { throw new ArgumentOutOfRangeException(nameof(i2c)); } }
/// <summary> /// Initializes a new instance of the <see cref="Dio016"/> class. /// </summary> /// <param name="i2c">The I2C master device.</param> /// <param name="slaveAddress">The bus address of the I2C device.</param> public Dio016(IFt4222I2cMaster i2c, byte slaveAddress = 0x24) { _ioExpander = new Pca9535(i2c, slaveAddress); }
/// <summary> /// Initializes a new instance of the <see cref="Aio320"/> class. /// </summary> /// <param name="i2c">The I2C master device.</param> /// <param name="adcAddress">The bus address of the ADC device.</param> /// <param name="muxAddress">The bus address of the Multiplexer device.</param> public Aio320(IFt4222I2cMaster i2c, int adcAddress = 0x49, int muxAddress = 0x3e) { _pca9554 = new Pca9554(i2c, muxAddress); _ads1115 = new Ads1115Slave(i2c, adcAddress); _mux = 0xff; }
/// <summary> /// Initializes a new instance of the <see cref="Dio84"/> class. /// </summary> /// <param name="i2c">The I2C master device.</param> /// <param name="slaveAddress">The bus address of the I2C device.</param> public Dio84(IFt4222I2cMaster i2c, int slaveAddress = 0x23) { _ioExpander = new Pca9535(i2c, slaveAddress); }
/// <summary> /// Initializes a new instance of the <see cref="Ft4222I2cSlaveDevice"/> class. /// </summary> /// <param name="i2cMaster">The I2C master device.</param> /// <param name="slaveAddress">The bus address of the I2C device.</param> public Ft4222I2cSlaveDevice(IFt4222I2cMaster i2cMaster, int slaveAddress) { _i2cMaster = i2cMaster ?? throw new ArgumentNullException(nameof(i2cMaster)); _slaveAddress = slaveAddress; }