Преглед изворни кода

made mistake parsing 7bit addresses

Jean LE QUELLEC пре 3 година
родитељ
комит
e12ba00461
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      i2cscanner.c

+ 1 - 1
i2cscanner.c

@@ -6,7 +6,7 @@ void scan_i2c_bus(i2cScanner* i2c_scanner) {
     // Get the bus
     furi_hal_i2c_acquire(I2C_BUS);
     // scan
-    for(uint8_t addr = 0x01; addr < MAX_I2C_ADDR; addr++) {
+    for(uint8_t addr = 0x01; addr <= MAX_I2C_ADDR << 1; addr++) {
         // Check for peripherals
         if(furi_hal_i2c_is_device_ready(I2C_BUS, addr, I2C_TIMEOUT)) {
             // skip even 8-bit addr