Class for making communication easier from code to i2c connected Rohm/Kionix sensors. Maybe could be used later also for abstracting Arduino/mbed os. Code ported from 'C'-library rohm-sensor-hal.

Dependents:   kionix-kx123-hello rohm-bh1790glc-hello simple-sensor-client rohm-SensorShield-example

Fork of rohm-sensor-hal by Rohm

Files at this revision

API Documentation at this revision

Comitter:
MikkoZ
Date:
Mon Oct 03 13:47:05 2016 +0000
Parent:
10:7ac47540f580
Child:
12:bc2446aabbfe
Commit message:
Bugfix of bugfix; ; Fixed unspecified name error. Compiles again.

Changed in this revision

source/RegisterWriter.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/source/RegisterWriter.cpp	Mon Oct 03 13:34:09 2016 +0000
+++ b/source/RegisterWriter.cpp	Mon Oct 03 13:47:05 2016 +0000
@@ -55,7 +55,7 @@
     uint8_t received_bytes;
     int read_ok;
 
-    i2c_bus.write( (int)((sad << 1) | I2C_WRITE), (char*)&reg, (int)1, repeated = true );
+    i2c_bus.write( (int)((sad << 1) | I2C_WRITE), (char*)&reg, (int)1, true );
     read_ok = i2c_bus.read( (int)((sad << 1) | I2C_READ), (char*)buf, (int)buf_len);
 
     if( read_ok == 0 ){     //0 == success(ack)