library for read and configuration the sensor FXOS8700CQ

Dependents:   1-K64F_with_5_acel

Fork of FXOS8700CQ by Thomas Murphy

Revision:
7:26db88bf6b70
Parent:
5:591f7d7f2c54
--- a/FXOS8700CQ.h	Mon Dec 05 09:24:27 2016 +0000
+++ b/FXOS8700CQ.h	Thu Jan 18 07:51:57 2018 +0000
@@ -124,7 +124,7 @@
     * @param sdl SCL pin
     * @param addr address of the I2C peripheral in (7-bit << 1) form
     */
-    FXOS8700CQ(PinName sda, PinName scl, int addr);
+    FXOS8700CQ(I2C * puntero, int addr);
 
     /**
     * FXOS8700CQ destructor
@@ -162,15 +162,15 @@
     */
     uint8_t get_accel_scale(void);
 
-
+    void read_regs(int reg_addr, uint8_t* data, int len);
 
 private:
-    I2C dev_i2c; // instance of the mbed I2C class
+    I2C *dev_i2c; // instance of the mbed I2C class
     uint8_t dev_addr; // Device I2C address, in (7-bit << 1) form
     bool enabled; // keep track of enable bit of device
 
     // I2C helper methods
-    void read_regs(int reg_addr, uint8_t* data, int len);
+    
     void write_regs(uint8_t* data, int len);
 
 };