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.
Dependencies: mbed FastIO FastPWM USBDevice
Fork of Pinscape_Controller by
Diff: MMA8451Q/MMA8451Q.cpp
- Revision:
- 76:7f5912b6340e
- Parent:
- 5:a70c0bce770d
- Child:
- 77:0b96f6867312
--- a/MMA8451Q/MMA8451Q.cpp Sun Jan 29 19:04:47 2017 +0000 +++ b/MMA8451Q/MMA8451Q.cpp Fri Feb 03 20:50:02 2017 +0000 @@ -144,6 +144,19 @@ active(); } +void MMA8451Q::clearInterruptMode() +{ + // go to standby mode + standby(); + + // clear the interrupt register + uint8_t d1[2] = { REG_CTRL_REG_4, 0 }; + writeRegs(d1, 2); + + // enter active mode + active(); +} + void MMA8451Q::standby() { // read the current control register