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.
Fork of MMA845x by
Revision 18:2316ca98e599, committed 2018-07-05
- Comitter:
- amateusz
- Date:
- Thu Jul 05 15:05:20 2018 +0000
- Parent:
- 17:ff9a9933d123
- Commit message:
- FIX setting LowPower mode <- wrong bitmask was setting Fast mode instead, SIC
Changed in this revision
| MMA845x.cpp | Show annotated file Show diff for this revision Revisions of this file |
| MMA845x.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r ff9a9933d123 -r 2316ca98e599 MMA845x.cpp
--- a/MMA845x.cpp Thu Jul 05 01:24:33 2018 +0000
+++ b/MMA845x.cpp Thu Jul 05 15:05:20 2018 +0000
@@ -108,7 +108,7 @@
}
result |= MMA845x::readRegister(CTRL_REG1, 1, datain);
- dataout = (datain[0] & 0xB1) | resolution | lo_noise | data_rate;
+ dataout = (datain[0] & 0xC1) | resolution | lo_noise | data_rate; // 0b 0010 1010
result |= MMA845x::writeRegister(CTRL_REG1, dataout); // Set resolution, Low Noise mode, and data rate
result |= MMA845x::readRegister(CTRL_REG2,1, datain);
diff -r ff9a9933d123 -r 2316ca98e599 MMA845x.h
--- a/MMA845x.h Thu Jul 05 01:24:33 2018 +0000
+++ b/MMA845x.h Thu Jul 05 15:05:20 2018 +0000
@@ -172,7 +172,7 @@
*/
enum LOW_NOISE {
LN_OFF = 0x00, /* Low Noise mode off */
- LN_ON = 0x02 /* Low Noise mode on, 4g max readings */
+ LN_ON = 0x04 /* Low Noise mode on, 4g max readings */
};
/**
