library mma8452

Dependents:   APP3_Capteur_V2

Fork of MMA8452 by Ashley Mills

Revision:
19:4d6cd7140a71
Parent:
18:27d839e6dc0e
Child:
20:d55e9d7eb17e
diff -r 27d839e6dc0e -r 4d6cd7140a71 MMA8452.h
--- a/MMA8452.h	Wed Mar 05 17:04:04 2014 +0000
+++ b/MMA8452.h	Thu Mar 06 18:07:43 2014 +0000
@@ -186,15 +186,41 @@
        */ 
       int readXYZRaw(char *dst);
       
+      int readXRaw(char *dst);
+      int readYRaw(char *dst);
+      int readZRaw(char *dst);
+      
       /**
-       * Read the x,y, and z counts of the MMA7452.
+       * Read the x, y, and z counts of the MMA7452 axes.
+       * 
+       * Count resolution is either 8 bits or 12 bits, and the range is either +-2G, +-4G, or +-8G
+       * depending on settings.
+       * 
+       * This function queries the MMA8452 and returns the signed counts for each axes.
+       *
+       * @param x Pointer to integer to store x count
+       * @param y Pointer to integer to store y count
+       * @param z Pointer to integer to store z count
+       * @return 0 on success, 1 on failure
        */
       int readXYZCounts(int *x, int *y, int *z);
+      int readXCount(int *x);
+      int readYCount(int *y);
+      int readZCount(int *z);
+      
       int readXYZGravity(double *x, double *y, double *z);
       
+      
+      /// Returns 1 if data has been internally sampled (is available) for the x-axis since last read, 0 otherwise.
       int isXReady();
+      
+      /// Returns 1 if data has been internally sampled (is available) for the y-axis since last read, 0 otherwise.
       int isYReady();
+      
+      /// Returns 1 if data has been internally sampled (is available) for the z-axis since last read, 0 otherwise.
       int isZReady();
+      
+      /// Returns 1 if data has been internally sampled (is available) for all axes since last read, 0 otherwise.
       int isXYZReady();
             
       /**