LSM9DS1 IMU sensor driver i2c

Dependents:   read_Pmod optWingforHAPS_Eigen hexaTest_Eigen

Revision:
2:9e0ac1cd9d79
Parent:
1:0e76f237c23d
Child:
3:8b71897cb24e
--- a/LSM9DS1.h	Mon Oct 19 13:56:52 2015 +0000
+++ b/LSM9DS1.h	Mon Sep 27 08:59:25 2021 +0000
@@ -214,7 +214,7 @@
     *   - mAddr = If MODE_I2C, this is the I2C address of the mag.
     *               If MODE_SPI, this is the cs pin of the mag (CS_M)
     */
-    LSM9DS1(PinName sda, PinName scl, uint8_t xgAddr = LSM9DS1_AG_I2C_ADDR(1), uint8_t mAddr = LSM9DS1_M_I2C_ADDR(1));
+    LSM9DS1(I2C& p_i2c, uint8_t xgAddr = LSM9DS1_AG_I2C_ADDR(1), uint8_t mAddr = LSM9DS1_M_I2C_ADDR(1));
     
     /**  begin() -- Initialize the gyro, accelerometer, and magnetometer.
     *  This will set up the scale and output rate of each sensor. It'll also
@@ -323,7 +323,7 @@
     uint8_t xgAddress, mAddress;
     
     // I2C bus
-    I2C i2c;
+    I2C &i2c;
 
     /**  gScale, aScale, and mScale store the current scale range for each 
     *  sensor. Should be updated whenever that value changes.