Pinscape Controller version 1 fork. This is a fork to allow for ongoing bug fixes to the original controller version, from before the major changes for the expansion board project.

Dependencies:   FastIO FastPWM SimpleDMA mbed

Fork of Pinscape_Controller by Mike R

Revision:
3:3514575d4f86
Parent:
1:d913e0afb2ac
Child:
5:a70c0bce770d
--- a/MMA8451Q/MMA8451Q.h	Tue Jul 22 04:33:47 2014 +0000
+++ b/MMA8451Q/MMA8451Q.h	Wed Jul 23 17:53:28 2014 +0000
@@ -98,6 +98,13 @@
    *  Read an X,Y pair
    */
   void getAccXY(float &x, float &y);
+  
+  /**
+   *  Read X,Y,Z.  This is the most efficient way to fetch
+   *  all of the axes at once, since it fetches all three
+   *  in a single I2C transaction.
+   */
+  void getAccXYZ(float &x, float &y, float &z);
 
   /**
    * Get Z axis acceleration
@@ -112,6 +119,13 @@
    * @param res array where acceleration data will be stored
    */
   void getAccAllAxis(float * res);
+  
+  /**
+   * Set interrupt mode.  'pin' is 1 for INT1_ACCEL (PTA14) and 2 for INT2_ACCEL (PTA15).
+   * The caller is responsible for setting up an interrupt handler on the corresponding
+   * PTAxx pin.
+   */
+  void setInterruptMode(int pin);
 
 private:
   I2C m_i2c;