InvenSense Motion Driver v5.1.2 ported

Dependents:   Sensorv2

Revision:
3:8ac73f9099ab
Parent:
1:dbbd3dcd61c9
Child:
4:2cb380415dc7
diff -r dbbd3dcd61c9 -r 8ac73f9099ab inv_mpu.cpp
--- a/inv_mpu.cpp	Sat Jun 07 21:05:23 2014 +0000
+++ b/inv_mpu.cpp	Wed Oct 15 04:59:22 2014 +0000
@@ -668,7 +668,16 @@
     }
     return 0;
 }
-
+int InvMpu::mpu_reset(void)
+{
+    unsigned char data[6];
+    data[0] = BIT_RESET;
+    if (i2Cdev.writeBytes(st.hw->addr, st.reg->pwr_mgmt_1, 1, data) )
+    {
+        return -1;
+    }
+    return 0;
+}
 
 InvMpu::InvMpu() : i2Cdev()
 {