Ahmad Alkaff / Mbed 2 deprecated CS3237

Dependencies:   mbed

Revision:
6:7f750ae168b6
Parent:
5:37a1e69f0f0f
Child:
8:9a1d472648dc
--- a/LIS2DH/LIS2DH.cpp	Mon Oct 21 03:37:27 2019 +0000
+++ b/LIS2DH/LIS2DH.cpp	Mon Oct 21 06:12:54 2019 +0000
@@ -192,10 +192,10 @@
   ///
   /// set HR (high resolution)
   ///
-  if (writeReg(LIS2DH_CTRL_REG4, 0x8) == -1) {
-    __enable_irq();
-    return -1;
-  }
+  //if (writeReg(LIS2DH_CTRL_REG4, 0x8) == -1) {
+    //__enable_irq();
+    //return -1;
+  //}
 
   ///
   /// set the data rate, enable all axis
@@ -208,7 +208,7 @@
   */
   
   ctrl_reg1.bit.ODR = dataRate; ///< set the data rate
-  ctrl_reg1.bit.LPen = 0x10;    ///< enable low power
+  ctrl_reg1.bit.LPen = 0x1;     ///< enable low power
   ctrl_reg1.bit.Zen = 0x1;      ///< enable z
   ctrl_reg1.bit.Yen = 0x1;      ///< enable y
   ctrl_reg1.bit.Xen = 0x1;      ///< enable x