Mike R / Mbed 2 deprecated Pinscape_Controller_V2

Dependencies:   mbed FastIO FastPWM USBDevice

Fork of Pinscape_Controller by Mike R

Revision:
76:7f5912b6340e
Parent:
5:a70c0bce770d
Child:
77:0b96f6867312
--- a/MMA8451Q/MMA8451Q.cpp	Sun Jan 29 19:04:47 2017 +0000
+++ b/MMA8451Q/MMA8451Q.cpp	Fri Feb 03 20:50:02 2017 +0000
@@ -144,6 +144,19 @@
     active();
 }
 
+void MMA8451Q::clearInterruptMode()
+{
+    // go to standby mode
+    standby();
+    
+    // clear the interrupt register
+    uint8_t d1[2] = { REG_CTRL_REG_4, 0 };
+    writeRegs(d1, 2);
+
+    // enter active mode
+    active();
+}
+
 void MMA8451Q::standby()
 {
     // read the current control register