HAHA
Dependencies: ST_INTERFACES X_NUCLEO_COMMON
Dependents: b_NYP_humanoid a_NYP_humanoid_copy
Fork of LSM6DSL by
Diff: LSM6DSLSensor.cpp
- Revision:
- 1:c583f32fe272
- Parent:
- 0:704c89673b57
- Child:
- 2:578a45c4dad5
diff -r 704c89673b57 -r c583f32fe272 LSM6DSLSensor.cpp --- a/LSM6DSLSensor.cpp Mon Sep 04 16:08:00 2017 +0000 +++ b/LSM6DSLSensor.cpp Wed Sep 27 16:50:11 2017 +0200 @@ -48,18 +48,10 @@ * @param i2c object of an helper class which handles the I2C peripheral * @param address the address of the component's instance */ -LSM6DSLSensor::LSM6DSLSensor(DevI2C &i2c, PinName int1_pin, PinName int2_pin) : _dev_i2c(i2c), _int1_irq(int1_pin), _int2_irq(int2_pin) +LSM6DSLSensor::LSM6DSLSensor(DevI2C *i2c, uint8_t address, PinName int1_pin, PinName int2_pin) : + _dev_i2c(i2c), _address(address), _cs_pin(NC), _int1_irq(int1_pin), _int2_irq(int2_pin) { - _address = LSM6DSL_ACC_GYRO_I2C_ADDRESS_HIGH; -}; - -/** Constructor - * @param i2c object of an helper class which handles the I2C peripheral - * @param address the address of the component's instance - */ -LSM6DSLSensor::LSM6DSLSensor(DevI2C &i2c, PinName int1_pin, PinName int2_pin, uint8_t address) : _dev_i2c(i2c), _int1_irq(int1_pin), _int2_irq(int2_pin), _address(address) -{ - + assert (i2c); }; /**