You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ut...@apache.org on 2018/04/18 21:56:27 UTC

[mynewt-core] 04/13: Add missing i2c addr shift left in probe

This is an automated email from the ASF dual-hosted git repository.

utzig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-core.git

commit a3852bd18ff2761f0781f005ccd25df2c9c06ae3
Author: Fabio Utzig <ut...@apache.org>
AuthorDate: Thu Mar 22 08:52:55 2018 -0300

    Add missing i2c addr shift left in probe
---
 hw/mcu/stm/stm32_common/src/hal_i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/mcu/stm/stm32_common/src/hal_i2c.c b/hw/mcu/stm/stm32_common/src/hal_i2c.c
index 0f829e6..7716f2f 100644
--- a/hw/mcu/stm/stm32_common/src/hal_i2c.c
+++ b/hw/mcu/stm/stm32_common/src/hal_i2c.c
@@ -159,6 +159,6 @@ hal_i2c_master_probe(uint8_t i2c_num, uint8_t address, uint32_t timo)
         return -1;
     }
 
-    rc = HAL_I2C_IsDeviceReady(&dev->hid_handle, address, 1, timo);
+    rc = HAL_I2C_IsDeviceReady(&dev->hid_handle, address << 1, 1, timo);
     return rc;
 }

-- 
To stop receiving notification emails like this one, please contact
utzig@apache.org.