library mma8452

Dependents:   APP3_Capteur_V2

Fork of MMA8452 by Ashley Mills

Revision:
16:d6dde2318edc
Parent:
15:7620a11149b8
Child:
17:6e4232c421c0
diff -r 7620a11149b8 -r d6dde2318edc MMA8452.h
--- a/MMA8452.h	Wed Mar 05 15:36:03 2014 +0000
+++ b/MMA8452.h	Wed Mar 05 16:47:13 2014 +0000
@@ -106,6 +106,9 @@
 
 // status masks and shifts
 #define MMA8452_STATUS_ZYXDR_MASK 0x08
+#define MMA8452_STATUS_ZDR_MASK 0x04
+#define MMA8452_STATUS_YDR_MASK 0x02
+#define MMA8452_STATUS_XDR_MASK 0x01
  
 class MMA8452         
 {        
@@ -244,6 +247,7 @@
       int twelveBitToSigned(char *buf);
       int eightBitToSigned(char *buf);
       double convertCountToGravity(int count, int countsPerG);
+      char getMaskedRegister(int reg, char mask);
     
       I2C _i2c;
       int _frequency;