HTS221 relative humidity and temperature sensor library
Dependencies: X_NUCLEO_COMMON ST_INTERFACES
Diff: HTS221Sensor.cpp
- Revision:
- 1:c4391f20553e
- Parent:
- 0:7917d6d00a6e
- Child:
- 2:312ee2694a77
diff -r 7917d6d00a6e -r c4391f20553e HTS221Sensor.cpp --- a/HTS221Sensor.cpp Mon Sep 04 16:06:23 2017 +0000 +++ b/HTS221Sensor.cpp Wed Sep 27 16:36:58 2017 +0200 @@ -48,19 +48,10 @@ * @param i2c object of an helper class which handles the I2C peripheral * @param address the address of the component's instance */ -HTS221Sensor::HTS221Sensor(DevI2C &i2c) : _dev_i2c(i2c) +HTS221Sensor::HTS221Sensor(DevI2C *i2c, uint8_t address, PinName drdy_pin) : + _dev_i2c(i2c), _address(address), _cs_pin(NC), _drdy_pin(drdy_pin) { - _address = HTS221_I2C_ADDRESS; -}; - - -/** Constructor - * @param i2c object of an helper class which handles the I2C peripheral - * @param address the address of the component's instance - */ -HTS221Sensor::HTS221Sensor(DevI2C &i2c, uint8_t address) : _dev_i2c(i2c), _address(address) -{ - + assert (i2c); }; /**