Device driver for the Freescale MMA845x family of accelerometers.
Fork of MMA845x by
Diff: MMA845x.h
- Revision:
- 1:37ddb4739f02
- Parent:
- 0:9d1e3a344e4f
- Child:
- 2:555f8ba0c959
diff -r 9d1e3a344e4f -r 37ddb4739f02 MMA845x.h --- a/MMA845x.h Fri Mar 29 21:51:11 2013 +0000 +++ b/MMA845x.h Thu Jan 05 06:41:39 2017 +0000 @@ -110,8 +110,7 @@ * @enum MMA845x_SA0 * @brief Possible terminations for the ADDR pin */ - enum MMA845x_SA0 - { + enum MMA845x_SA0 { SA0_VSS = 0, /*!< SA0 connected to VSS */ SA0_VDD /*!< SA0 connected to VDD */ }; @@ -120,8 +119,7 @@ * @enum MMA845x_WHO_AM_I * @brief Device ID's that this class is compatible with */ - enum MMA845x_WHO_AM_I - { + enum MMA845x_WHO_AM_I { MMA8451 = 0x1a, /*!< MMA8451 WHO_AM_I register content */ MMA8452 = 0x2a, /*!< MMA8452 WHO_AM_I register content */ MMA8453 = 0x3a, /*!< MMA8453 WHO_AM_I register content */ @@ -131,8 +129,7 @@ * @enum MMA845x_REGISTER * @brief The device register map */ - enum MMA845x_REGISTER - { + enum MMA845x_REGISTER { STATUS = 0x0, OUT_X_MSB, OUT_X_LSB, OUT_Y_MSB, OUT_Y_LSB, OUT_Z_MSB, OUT_Z_LSB, @@ -156,7 +153,7 @@ * @param int2 - A defined InterruptIn object * @param i2c_addr - Connection of the address line */ - MMA845x(I2C &i2c, InterruptIn &int1, InterruptIn &int2, MMA845x_SA0 const i2c_addr); + MMA845x(I2C &i2c, InterruptIn &int1, InterruptIn &int2); /** Get the X data * @return The last valid reading from the accelerometer