/// <summary> /// IHMSSI constructor /// </summary> /// <param name="leds">if changed PCF8574 SLA must be in [0x20, 0x27], PCF8574A in [0x38, 0x3F] and Frequency in [100kHz,400kHz]</param> /// <param name="BPs">if changed PCF8574 SLA must be in [0x20, 0x27], PCF8574A in [0x38, 0x3F] and Frequency in [100kHz,400kHz]</param> /// <param name="lcd">lcd is MIDAS(0x3A) or BATRON(0x3B), Frequency in [100kHz,400kHz]</param> /// <remarks> /// All Led => Off; Lcd => Init /// </remarks> public IHMSSI(PCF8574 leds, PCF8574 BPs, I2CLcd lcd) { this.leds = leds; this.BPs = BPs; this.lcd = lcd; d0 = new Led(false, 0, leds); d1 = new Led(false, 1, leds); d2 = new Led(false, 2, leds); d3 = new Led(false, 3, leds); d4 = new Led(false, 4, leds); d5 = new Led(false, 5, leds); d6 = new Led(false, 6, leds); d7 = new Led(false, 7, leds); bpPlus = new BP(BPs, 1); bpFleHaut = new BP(BPs, 2); bpFleBas = new BP(BPs, 4); bpMoins = new BP(BPs, 8); bpSet = new BP(BPs, 16); bpOk = new BP(BPs, 32); bpEnter = new BP(BPs, 64); bpEchap = new BP(BPs, 128); leds.Write(0xff); // Leds Off lcd.Init(); lcd.ClearScreen(); }
/// <summary> ///IHMSSI constructor with LCD = MIDAS(0x3A); PCF8574(A) SLA are 0x3f for BP and 0x38 for Led; I2C Bus Frequency = 100kHz /// </summary> /// <param name="leds">if changed PCF8574 SLA must be in [0x20, 0x27], PCF8574A in [0x38, 0x3F] and Frequency in [100kHz,400kHz]</param> /// <param name="lcd">lcd is MIDAS(0x3A) or BATRON(0x3B)</param> /// <remarks> /// All Led => Off; Lcd => Init /// </remarks> public IHMSSI(PCF8574 leds, I2CLcd lcd) : this(leds, new PCF8574(0x3f, 100), lcd) { }
/// <summary> /// IHMSSI constructor with PCF8574(A) SLA are 0x3f for BP and 0x38 for Led; I2C Bus Frequency = 100kHz /// </summary> /// <param name="lcd">MIDAS(0x3A) or BATRON(0x3B)</param> /// <remarks> /// All Led => Off; Lcd => Init /// </remarks> public IHMSSI(I2CLcd lcd) : this(new PCF8574(0x38, 100), new PCF8574(0x3f, 100), lcd) { }