htu21d_for_weather_shield

Dependents:   SPARKFUN_WEATHER_SHIELD

Fork of htu21d by Kevin Braun

Revision:
4:fe060047cc24
Parent:
3:5c0f8e91d319
--- a/htu21d.cpp	Thu Apr 30 00:34:03 2015 +0000
+++ b/htu21d.cpp	Thu Oct 20 16:47:38 2016 +0000
@@ -1,6 +1,5 @@
 /**
 HTU21D / HPP828E031 driver for mbed.
-- Includes RTOS hooks if RTOS is detected during compile.
 Author: Kevin Braun
 **/
 
@@ -16,13 +15,12 @@
 //--------------------------------------------------------------------------------------------------------------------------------------//
 //Contstructor
 
-htu21d::htu21d(PinName sda, PinName scl) : _i2c(sda, scl) {
-    _i2c.frequency(400000);
+htu21d::htu21d(I2C i2c) : _i2c(i2c)
+{
+      i2c.frequency(400000);
 }
 
-htu21d::htu21d(PinName sda, PinName scl, int i2cFrequency) : _i2c(sda, scl) {
-    _i2c.frequency(i2cFrequency);
-}
+
 
 //--------------------------------------------------------------------------------------------------------------------------------------//
 //Destructor