فهرست منبع

Fix address in I2C scanner (#865)

Oleg Kalachev 4 سال پیش
والد
کامیت
c2c17c761e
1فایلهای تغییر یافته به همراه2 افزوده شده و 2 حذف شده
  1. 2 2
      applications/cli/cli_commands.c

+ 2 - 2
applications/cli/cli_commands.c

@@ -472,8 +472,8 @@ void cli_command_i2c(Cli* cli, string_t args, void* context) {
     for(uint8_t row = 0; row < 0x8; row++) {
         printf("%x | ", row);
         for(uint8_t column = 0; column <= 0xF; column++) {
-            bool ret =
-                furi_hal_i2c_rx(&furi_hal_i2c_handle_external, (row << 4) + column, &test, 1, 2);
+            bool ret = furi_hal_i2c_rx(
+                &furi_hal_i2c_handle_external, ((row << 4) + column) << 1, &test, 1, 2);
             printf("%c ", ret ? '#' : '-');
         }
         printf("\r\n");