Device driver for the Freescale MMA845x family of accelerometers.
Dependents: MMA845x_test KL05_accel-test
MMA845x_DATA Class Reference
Using the Sparkfun SEN-10955. More...
#include <MMA845x.h>
Public Member Functions | |
MMA845x_DATA (uint16_t x=0, uint16_t y=0, uint16_t z=0) | |
Create the MMA845x_DATA object initialized to the parameter (or 0 if none) | |
MMA845x_DATA & | operator= (MMA845x_DATA const &rhs) |
Overloaded '=' operator to allow shorthand coding, assigning objects to one another. | |
MMA845x_DATA & | operator= (uint16_t const val) |
Overloaded '=' operator to allow shorthand coding, assigning objects to one another. | |
bool | operator== (MMA845x_DATA const &rhs) const |
Overloaded '==' operator to allow shorthand coding, test objects to one another. | |
Data Fields | |
volatile uint16_t | _x |
volatile uint16_t | _y |
volatile uint16_t | _z |
Detailed Description
Using the Sparkfun SEN-10955.
Example:
#include "mbed.h" #include "MMA845x.h" int main() { }
API abstraction for the MMA845x 3-axis accelerometer IC data
Definition at line 51 of file MMA845x.h.
Constructor & Destructor Documentation
MMA845x_DATA | ( | uint16_t | x = 0 , |
uint16_t | y = 0 , |
||
uint16_t | z = 0 |
||
) |
Create the MMA845x_DATA object initialized to the parameter (or 0 if none)
- Parameters:
-
x - the init value of _x y - the init value of _y x - the init value of _z
Member Function Documentation
MMA845x_DATA& operator= | ( | MMA845x_DATA const & | rhs ) |
MMA845x_DATA& operator= | ( | uint16_t const | val ) |
bool operator== | ( | MMA845x_DATA const & | rhs ) | const |
Field Documentation
Generated on Tue Jul 12 2022 13:55:36 by 1.7.2