Driver library for the Freescale FXOS8700Q sensor

Dependencies:   MotionSensor

Dependents:   el14dg_Project frdm_serial_peopleAndComputing simple-client-app-shield pelion-example-frdm ... more

Fork of FXOS8700Q by Freescale

Revision:
11:aee7dea904e2
Parent:
10:834488c11340
diff -r 834488c11340 -r aee7dea904e2 FXOS8700Q.cpp
--- a/FXOS8700Q.cpp	Thu Jun 18 22:53:07 2015 +0000
+++ b/FXOS8700Q.cpp	Fri Jun 19 12:16:44 2015 -0500
@@ -53,10 +53,10 @@
     _addr = 0;
 }
 
-void FXOS8700Q::readRegs(int addr, uint8_t *data, uint32_t len) const
+void FXOS8700Q::readRegs(uint8_t addr, uint8_t *data, uint32_t len) const
 {
-    char t[1] = {addr};
-    _i2c->write(_addr, t, sizeof(t), true);
+    uint8_t t[1] = {addr};
+    _i2c->write(_addr, (char *)t, sizeof(t), true);
     _i2c->read(_addr, (char *)data, len);
 }
 
@@ -72,6 +72,7 @@
     _i2c->write(_addr, (char *)data, len);
 }
 
+
 int16_t FXOS8700Q::getSensorAxis(uint8_t addr) const
 {
     uint8_t res[2];