has freefall register definitions
Fork of MMA8452Q by
Revision 1:2b812ae875eb, committed 2017-12-07
- Comitter:
- jakebonney10
- Date:
- Thu Dec 07 14:49:13 2017 +0000
- Parent:
- 0:b3305e3c9e73
- Commit message:
- freefall
Changed in this revision
MMA8452Q.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r b3305e3c9e73 -r 2b812ae875eb MMA8452Q.h --- a/MMA8452Q.h Thu Oct 19 12:53:02 2017 +0000 +++ b/MMA8452Q.h Thu Dec 07 14:49:13 2017 +0000 @@ -17,6 +17,14 @@ #define REG_WHO_AM_I 0x0D #define REG_XYZ_DATA_CFG 0x0E #define REG_CTRL_REG1 0x2A +// free fall motion register definitions +#define FF_MT_CFG 0x15 // Freefall/Motion functional block configuration +#define FF_MT_SRC 0x16 // Freefall/Motion event source register +#define FF_MT_THS 0x17 // Freefall/Motion threshold register +#define FF_MT_COUNT 0x18 // Freefall/Motion debounce counter +//#define INT_CFG_FF_MT +//#define INT_EN_FF_MT // Interrupt Enable. (Default value: 0)( 0: Freefall/Motion interrupt disabled; 1: Freefall/Motion interrupt enabled) + // WHO_AM_I check #define FACTORY_ID 0x2A @@ -53,6 +61,7 @@ void setODR(uint8_t odr); void standby(); void active(); + void ff_mt(); float readX(); float readY(); float readZ();