Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: LIS2DH/LIS2DH.cpp
- Revision:
- 6:7f750ae168b6
- Parent:
- 5:37a1e69f0f0f
- Child:
- 8:9a1d472648dc
diff -r 37a1e69f0f0f -r 7f750ae168b6 LIS2DH/LIS2DH.cpp
--- 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
