From c2c17c761ef789e4e5b7d81e49cc6e98198e907e Mon Sep 17 00:00:00 2001 From: Oleg Kalachev Date: Sat, 4 Dec 2021 16:21:58 +0300 Subject: [PATCH] Fix address in I2C scanner (#865) --- applications/cli/cli_commands.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/applications/cli/cli_commands.c b/applications/cli/cli_commands.c index 1834282f..4711b13d 100644 --- a/applications/cli/cli_commands.c +++ b/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");