Commit

Files at this revision

API Documentation at this revision

Comitter:
sebbarpar
Date:
Thu Mar 05 11:09:59 2020 +0000
Parent:
4:c4d879a39775
Commit message:
Commit

Changed in this revision

MMA8451Q.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MMA8451Q.cpp	Fri Oct 12 11:35:07 2012 +0000
+++ b/MMA8451Q.cpp	Thu Mar 05 11:09:59 2020 +0000
@@ -71,7 +71,7 @@
 }
 
 void MMA8451Q::readRegs(int addr, uint8_t * data, int len) {
-    char t[1] = {addr};
+    char t[1] = {(char) addr};
     m_i2c.write(m_addr, t, 1, true);
     m_i2c.read(m_addr, (char *)data, len);
 }