Modified FXAS21000 library. changed _i2c to a pointer allowing you to pass an existing I2C object to the library instead of initializing a new one each time. This is mainly to make this library more practical to use alongside other I2C sensors.
Fork of FXAS21000 by
Diff: FXAS21000.h
- Revision:
- 4:c411fbb2cc2f
- Parent:
- 3:a8f83b52f4df
--- a/FXAS21000.h Mon Jun 02 17:36:38 2014 +0000 +++ b/FXAS21000.h Mon Aug 17 18:25:11 2015 +0000 @@ -48,6 +48,7 @@ * @param sdl SCL pin */ FXAS21000(PinName sda, PinName scl); + FXAS21000(I2C *i2c); /** * Get the Gyro values as floating point degrees / second @@ -71,7 +72,7 @@ char getWhoAmI(void); private: - I2C _i2c; + I2C *_i2c; /** * Set the device in active mode