Ultra-compact high-performance eCompass module: ultra-low power 3D accelerometer and 3D magnetometer.
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Dependents: HelloWorld_ST_Sensors MOTENV_Mbed mbed-os-mqtt-client LSM303AGR_JS ... more
Diff: LSM303AGRAccSensor.cpp
- Revision:
- 1:86d530a7f949
- Parent:
- 0:ec6e59cc6f40
- Child:
- 2:e37be5550633
--- a/LSM303AGRAccSensor.cpp Mon Sep 04 16:08:24 2017 +0000 +++ b/LSM303AGRAccSensor.cpp Wed Sep 27 16:49:51 2017 +0200 @@ -47,18 +47,10 @@ * @param i2c object of an helper class which handles the I2C peripheral * @param address the address of the component's instance */ -LSM303AGRAccSensor::LSM303AGRAccSensor(DevI2C &i2c) : _dev_i2c(i2c) +LSM303AGRAccSensor::LSM303AGRAccSensor(DevI2C *i2c, uint8_t address, PinName int1_pin, PinName int2_pin) : + _dev_i2c(i2c), _address(address), _cs_pin(NC), _int1_pin(int1_pin), _int2_pin(int2_pin) { - _address = LSM303AGR_ACC_I2C_ADDRESS; -}; - -/** Constructor - * @param i2c object of an helper class which handles the I2C peripheral - * @param address the address of the component's instance - */ -LSM303AGRAccSensor::LSM303AGRAccSensor(DevI2C &i2c, uint8_t address) : _dev_i2c(i2c), _address(address) -{ - + assert (i2c); }; /**