Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of FXOS8700Q by
Diff: FXOS8700Q.cpp
- Revision:
- 11:aee7dea904e2
- Parent:
- 10:834488c11340
--- 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];
