Version with sensors supporting SPI 3-wires
Dependencies: ST_INTERFACES X_NUCLEO_COMMON_SPI3W
Fork of X_NUCLEO_IKS01A2 by
Diff: XNucleoIKS01A2.cpp
- Revision:
- 11:6c2d5fbdab18
- Parent:
- 6:671fd10a51b7
- Child:
- 17:991f03a4e8b8
diff -r 7ced1e5f49dc -r 6c2d5fbdab18 XNucleoIKS01A2.cpp --- a/XNucleoIKS01A2.cpp Tue Mar 14 15:39:53 2017 +0100 +++ b/XNucleoIKS01A2.cpp Fri May 12 13:18:43 2017 +0000 @@ -47,13 +47,14 @@ /** * @brief Constructor */ + XNucleoIKS01A2::XNucleoIKS01A2(DevI2C *ext_i2c, PinName int1, PinName int2) : dev_i2c(ext_i2c), - ht_sensor(new HTS221Sensor(*dev_i2c)), - magnetometer(new LSM303AGRMagSensor(*dev_i2c)), - accelerometer(new LSM303AGRAccSensor(*dev_i2c)), - pt_sensor(new LPS22HBSensor(*dev_i2c)), - acc_gyro(new LSM6DSLSensor(*dev_i2c, int1, int2)) -{ + ht_sensor(new HTS221Sensor(dev_i2c)), + magnetometer(new LSM303AGRMagSensor(dev_i2c)), + accelerometer(new LSM303AGRAccSensor(dev_i2c)), + pt_sensor(new LPS22HBSensor(dev_i2c)), + acc_gyro(new LSM6DSLSensor(dev_i2c, LSM6DSL_ACC_GYRO_I2C_ADDRESS_HIGH, int1, int2)) +{ ht_sensor->init(NULL); magnetometer->init(NULL); accelerometer->init(NULL);