Platform HAL for rohm sensor drivers. Used for abstracting Arduino/mbed os/mbed classic.
Dependents: rohm-bm1383-hello-mbedclassic rohm-bh1726-hello rohm-rpr0521-hello rohm-bh1745-hello ... more
Diff: source/I2CCommonMbedHardwareLib.cpp
- Revision:
- 8:4d5812bed3fb
- Parent:
- 3:309530db41ec
--- a/source/I2CCommonMbedHardwareLib.cpp Tue Apr 12 12:55:24 2016 +0000
+++ b/source/I2CCommonMbedHardwareLib.cpp Mon Feb 18 16:19:45 2019 +0900
@@ -30,7 +30,7 @@
uint8_t received_bytes;
int read_ok;
- i2c.write( (int)((sad << 1) | I2C_WRITE), (char*)®, (int)1 );
+ i2c.write( (int)((sad << 1) | I2C_WRITE), (char*)®, (int)1, true );
read_ok = i2c.read( (int)((sad << 1) | I2C_READ), (char*)buf, (int)buf_len);
if( read_ok == 0 ){ //0 == success(ack)