I2C hang recover function added
Dependencies: UniGraphic mbed vt100
MMA8451Q Class Reference
MMA8451Q 3-Axis, 14-bit/8-bit Digital Accelerometer. More...
#include <MMA8451Q.h>
Public Member Functions | |
MMA8451Q (I2C *i2c, int addr) | |
MMA8451Q constructor. | |
~MMA8451Q () | |
MMA8451Q destructor. | |
int | getAllRawData (int16_t data[]) |
get all x, y, z data as int16_t | |
int | getAllData (float value[]) |
get all x, y, z data as float |
Detailed Description
MMA8451Q 3-Axis, 14-bit/8-bit Digital Accelerometer.
Definition at line 9 of file MMA8451Q.h.
Constructor & Destructor Documentation
MMA8451Q | ( | I2C * | i2c, |
int | addr | ||
) |
MMA8451Q constructor.
- Parameters:
-
i2c pointer to the I2C object addr 7bit addr of the I2C peripheral
Definition at line 66 of file MMA8451Q.cpp.
~MMA8451Q | ( | ) |
MMA8451Q destructor.
Definition at line 73 of file MMA8451Q.cpp.
Member Function Documentation
int getAllData | ( | float | value[] ) |
get all x, y, z data as float
- Parameters:
-
data three float data will be returned
- Returns:
- I2C status 0: success others: I2C error
Definition at line 110 of file MMA8451Q.cpp.
int getAllRawData | ( | int16_t | data[] ) |
get all x, y, z data as int16_t
- Parameters:
-
data[] three int16_t data will be returned
- Returns:
- I2C status 0: success others: I2C error
Definition at line 97 of file MMA8451Q.cpp.
Generated on Sat Jul 16 2022 08:26:44 by 1.7.2