Works with 8g
Fork of MMA8452 by
Diff: MMA8452.h
- Revision:
- 9:dfb0f6a7a455
- Parent:
- 8:89272163f395
- Child:
- 10:ca9ba7ad4e94
diff -r 89272163f395 -r dfb0f6a7a455 MMA8452.h --- a/MMA8452.h Thu Oct 17 10:08:51 2013 +0000 +++ b/MMA8452.h Thu Oct 17 10:21:37 2013 +0000 @@ -142,7 +142,7 @@ * * This method is used to find out the system mode of the chip ACTIVE = 0x00 or STANDBY = 0x01 */ - int get_SystemMode(int& deviceSystemMode); + int get_SystemMode(int *dst); /** Get status of the MMA8452 (not required) @@ -154,7 +154,7 @@ * x,y and z values have been overwritten before they have been read since a change happened. * */ - int get_Status(int& deviceStatus); + int get_Status(int *dst); /** Activate the MMA8452 (required) @@ -185,7 +185,7 @@ * This will return the state of the control register 1. This holds and sets values for auto wake, sleep mode * output data rate, fast read mode and active/standby. More info on 6.7 of pdf for MMA8452 Freescale doc. */ - int get_CTRL_Reg1(int* CTRL_Reg); + int get_CTRL_Reg1(int* dst); /** Initialization of device MMA8452 (required) @@ -198,7 +198,7 @@ * return 0 for success or * return 1 for failure. */ - int get_DeviceID(int& deviceID); + int get_DeviceID(int *dst); int read_y(); @@ -236,7 +236,7 @@ * @param addr The internal registeraddress of the MMA8452 * @returns The value of the register */ - char read_reg(char addr); + int read_reg(char addr, int *dst); /** Write to specified MMA8452 register *