Added code to manage Orientation, FreeFall and Motion Detection. Data is also available via IRQ.
Dependents: Test_FRDM_MMA8451Q AccelTest FRDM-KL46-Template KL25Z_Demo ... more
Fork of MMA8451Q by
Diff: MMA8451Q.h
- Revision:
- 10:fa532bf396fb
- Parent:
- 9:2aa9b1668d14
--- a/MMA8451Q.h Tue May 28 20:19:38 2013 +0000 +++ b/MMA8451Q.h Thu Aug 22 15:21:47 2013 +0000 @@ -149,6 +149,34 @@ void getAccAllAxis(float * res); /** + * Get raw value for X axis acceleration + * + * @returns X axis acceleration + */ + int16_t getAccRawX( int16_t * res); + + /** + * Get raw value for Y axis acceleration + * + * @returns Y axis acceleration + */ + int16_t getAccRawY( int16_t * res); + + /** + * Get raw value for Z axis acceleration + * + * @returns Z axis acceleration + */ + int16_t getAccRawZ( int16_t * res); + + /** + * Get raw values for XYZ axis acceleration + * + * @param res array where acceleration data will be stored + */ + unsigned int getAccRawAllAxis(int16_t * res); + + /** * Configure the Accelerometere for free fall detection * * @param pointer to the user function to execute after IRQ assertion @@ -210,6 +238,8 @@ */ void DataReady( void(*fptr)(void), unsigned char ODR); + unsigned int isDataAvailable( void); + /** * Soft Reset * @param none