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

Files at this revision

API Documentation at this revision

Comitter:
Ren Boting
Date:
Mon Feb 18 16:19:45 2019 +0900
Parent:
7:f83fa2f3cfab
Child:
9:aecd1e03720a
Commit message:
fix "Manufacturer read failed" when calling read_register.

Changed in this revision

source/I2CCommonMbedHardwareLib.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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*)&reg, (int)1 );
+    i2c.write( (int)((sad << 1) | I2C_WRITE), (char*)&reg, (int)1, true );
     read_ok = i2c.read( (int)((sad << 1) | I2C_READ), (char*)buf, (int)buf_len);
 
     if( read_ok == 0 ){     //0 == success(ack)