Fix address in I2C scanner (#865)

This commit is contained in:
Oleg Kalachev 2021-12-04 16:21:58 +03:00 committed by GitHub
parent fbd05598ad
commit c2c17c761e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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