Forked version of the FXOS8700CQ library which maintains its own memory
Dependents: fxos8700cq_example
Fork of FXOS8700CQ by
Diff: FXOS8700CQ.h
- Revision:
- 5:2bd683278d23
- Parent:
- 2:4c2f8a3549a9
--- a/FXOS8700CQ.h Wed May 28 17:08:33 2014 +0000 +++ b/FXOS8700CQ.h Thu Mar 02 17:12:06 2017 +0000 @@ -143,11 +143,9 @@ /** * Data retrieval from the FXOS8700CQ * - * @param accel_data destination XYZ accelerometer data struct - * @param magn_data destination XYZ magnetometer data struct * @return 0 on success, non-zero on failure */ - uint8_t get_data(SRAWDATA *accel_data, SRAWDATA *magn_data); + uint8_t get_data(); /** * Retrieve the full-range scale value of the accelerometer @@ -155,6 +153,13 @@ * @return 2, 4, or 8, depending on part configuration; 0 on error */ uint8_t get_accel_scale(void); + + int16_t getAccelX(); + int16_t getAccelY(); + int16_t getAccelZ(); + int16_t getMagnetX(); + int16_t getMagnetY(); + int16_t getMagnetZ(); @@ -166,6 +171,9 @@ // I2C helper methods void read_regs(int reg_addr, uint8_t* data, int len); void write_regs(uint8_t* data, int len); + + SRAWDATA *accel_data; + SRAWDATA *magn_data; };