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 MMA8451Q8b by
Revision 13:5aa0ca69a070, committed 2017-03-13
- Comitter:
- mireyarod23
- Date:
- Mon Mar 13 16:33:57 2017 +0000
- Parent:
- 12:12b18fdb72f7
- Commit message:
- Mireya Mid Term;
Changed in this revision
MMA8451Q8g.cpp | Show annotated file Show diff for this revision Revisions of this file |
diff -r 12b18fdb72f7 -r 5aa0ca69a070 MMA8451Q8g.cpp --- a/MMA8451Q8g.cpp Mon Feb 22 16:54:40 2016 +0000 +++ b/MMA8451Q8g.cpp Mon Mar 13 16:33:57 2017 +0000 @@ -56,6 +56,7 @@ readRegs(REG_WHO_AM_I, &who_am_i, 1); return who_am_i; } + void MMA8451Q::setStandbyMode(){ #define ACTIVEMASK 0x01 uint8_t registerData[1]; @@ -84,6 +85,7 @@ writeRegs(data, 2);// change g limit setActiveMode(); // make active } + // add Pusle configuration register access // Also add function prototype to .h file void MMA8451Q::setPulseConfiguration(uint8_t latch,uint8_t axisSet) { @@ -115,7 +117,6 @@ return (float(getAccAxis(REG_OUT_X_MSB))/gScaling[gChosen]); } - float MMA8451Q::getAccY() { return (float(getAccAxis(REG_OUT_Y_MSB))/gScaling[gChosen]); }