various fixes
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/56e5f25d Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/56e5f25d Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/56e5f25d Branch: refs/heads/bluetooth5 Commit: 56e5f25d8cab939fe97e2246674dcac1c03be5fc Parents: 5c343f5 Author: Jacob Rosenthal <[email protected]> Authored: Wed May 10 21:54:07 2017 -0700 Committer: Jacob Rosenthal <[email protected]> Committed: Wed May 10 22:06:15 2017 -0700 ---------------------------------------------------------------------- hw/drivers/sensors/bno055/src/bno055.c | 10 +++++----- hw/drivers/sensors/tcs34725/src/tcs34725.c | 14 +++++++------- 2 files changed, 12 insertions(+), 12 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/56e5f25d/hw/drivers/sensors/bno055/src/bno055.c ---------------------------------------------------------------------- diff --git a/hw/drivers/sensors/bno055/src/bno055.c b/hw/drivers/sensors/bno055/src/bno055.c index eac3600..7502c5b 100644 --- a/hw/drivers/sensors/bno055/src/bno055.c +++ b/hw/drivers/sensors/bno055/src/bno055.c @@ -141,7 +141,7 @@ bno055_writelen(uint8_t reg, uint8_t *buffer, uint8_t len) rc = hal_i2c_master_write(MYNEWT_VAL(BNO055_I2CBUS), &data_struct, OS_TICKS_PER_SEC / 10, 1); if (rc) { - BNO055_ERR("I2C access failed at address 0x%02X\n", addr); + BNO055_ERR("I2C access failed at address 0x%02X\n", data_struct.address); #if MYNEWT_VAL(BNO055_STATS) STATS_INC(g_bno055stats, errors); #endif @@ -154,7 +154,7 @@ bno055_writelen(uint8_t reg, uint8_t *buffer, uint8_t len) OS_TICKS_PER_SEC / 10, len); if (rc) { - BNO055_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg); + BNO055_ERR("Failed to read from 0x%02X:0x%02X\n", data_struct.address, reg); #if MYNEWT_VAL(BNO055_STATS) STATS_INC(g_bno055stats, errors); #endif @@ -205,7 +205,7 @@ bno055_read8(uint8_t reg, uint8_t *value) OS_TICKS_PER_SEC / 10, 1); *value = payload; if (rc) { - BNO055_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg); + BNO055_ERR("Failed to read from 0x%02X:0x%02X\n", data_struct.address, reg); #if MYNEWT_VAL(BNO055_STATS) STATS_INC(g_bno055stats, errors); #endif @@ -246,7 +246,7 @@ bno055_readlen(uint8_t reg, uint8_t *buffer, uint8_t len) rc = hal_i2c_master_write(MYNEWT_VAL(BNO055_I2CBUS), &data_struct, OS_TICKS_PER_SEC / 10, 1); if (rc) { - BNO055_ERR("I2C access failed at address 0x%02X\n", addr); + BNO055_ERR("I2C access failed at address 0x%02X\n", data_struct.address); #if MYNEWT_VAL(BNO055_STATS) STATS_INC(g_bno055stats, errors); #endif @@ -260,7 +260,7 @@ bno055_readlen(uint8_t reg, uint8_t *buffer, uint8_t len) OS_TICKS_PER_SEC / 10, 1); if (rc) { - BNO055_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg); + BNO055_ERR("Failed to read from 0x%02X:0x%02X\n", data_struct.address, reg); #if MYNEWT_VAL(BNO055_STATS) STATS_INC(g_bno055stats, errors); #endif http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/56e5f25d/hw/drivers/sensors/tcs34725/src/tcs34725.c ---------------------------------------------------------------------- diff --git a/hw/drivers/sensors/tcs34725/src/tcs34725.c b/hw/drivers/sensors/tcs34725/src/tcs34725.c index e535512..d023d21 100644 --- a/hw/drivers/sensors/tcs34725/src/tcs34725.c +++ b/hw/drivers/sensors/tcs34725/src/tcs34725.c @@ -115,7 +115,7 @@ tcs34725_write8(uint8_t reg, uint32_t value) OS_TICKS_PER_SEC / 10, 1); if (rc) { TCS34725_ERR("Failed to write to 0x%02X:0x%02X with value 0x%02X\n", - addr, reg, value); + data_struct.address, reg, value); #if MYNEWT_VAL(TCS34725_STATS) STATS_INC(g_tcs34725stats, errors); #endif @@ -149,7 +149,7 @@ tcs34725_read8(uint8_t reg, uint8_t *value) rc = hal_i2c_master_write(MYNEWT_VAL(TCS34725_I2CBUS), &data_struct, OS_TICKS_PER_SEC / 10, 1); if (rc) { - TCS34725_ERR("I2C access failed at address 0x%02X\n", addr); + TCS34725_ERR("I2C access failed at address 0x%02X\n", data_struct.address); #if MYNEWT_VAL(TCS34725_STATS) STATS_INC(g_tcs34725stats, errors); #endif @@ -162,7 +162,7 @@ tcs34725_read8(uint8_t reg, uint8_t *value) OS_TICKS_PER_SEC / 10, 1); *value = payload; if (rc) { - TCS34725_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg); + TCS34725_ERR("Failed to read from 0x%02X:0x%02X\n", data_struct.address, reg); #if MYNEWT_VAL(TCS34725_STATS) STATS_INC(g_tcs34725stats, errors); #endif @@ -200,7 +200,7 @@ tcs34725_readlen(uint8_t reg, uint8_t *buffer, uint8_t len) rc = hal_i2c_master_write(MYNEWT_VAL(TCS34725_I2CBUS), &data_struct, OS_TICKS_PER_SEC / 10, 1); if (rc) { - TCS34725_ERR("I2C access failed at address 0x%02X\n", addr); + TCS34725_ERR("I2C access failed at address 0x%02X\n", data_struct.address); #if MYNEWT_VAL(TCS34725_STATS) STATS_INC(g_tcs34725stats, errors); #endif @@ -214,7 +214,7 @@ tcs34725_readlen(uint8_t reg, uint8_t *buffer, uint8_t len) OS_TICKS_PER_SEC / 10, 1); if (rc) { - TCS34725_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg); + TCS34725_ERR("Failed to read from 0x%02X:0x%02X\n", data_struct.address, reg); #if MYNEWT_VAL(TCS34725_STATS) STATS_INC(g_tcs34725stats, errors); #endif @@ -255,7 +255,7 @@ tcs34725_writelen(uint8_t reg, uint8_t *buffer, uint8_t len) rc = hal_i2c_master_write(MYNEWT_VAL(TCS34725_I2CBUS), &data_struct, OS_TICKS_PER_SEC / 10, 1); if (rc) { - TCS34725_ERR("I2C access failed at address 0x%02X\n", addr); + TCS34725_ERR("I2C access failed at address 0x%02X\n", data_struct.address); #if MYNEWT_VAL(TCS34725_STATS) STATS_INC(g_tcs34725stats, errors); #endif @@ -268,7 +268,7 @@ tcs34725_writelen(uint8_t reg, uint8_t *buffer, uint8_t len) OS_TICKS_PER_SEC / 10, len); if (rc) { - TCS34725_ERR("Failed to read from 0x%02X:0x%02X\n", addr, reg); + TCS34725_ERR("Failed to read from 0x%02X:0x%02X\n", data_struct.address, reg); #if MYNEWT_VAL(TCS34725_STATS) STATS_INC(g_tcs34725stats, errors); #endif
