Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Diff: lib_SHT25.cpp
- Revision:
- 4:21a50575cb79
- Parent:
- 3:81324c19d870
- Child:
- 5:8e34f365eb45
--- a/lib_SHT25.cpp Tue Dec 11 13:09:18 2018 +0000
+++ b/lib_SHT25.cpp Tue Dec 03 09:23:44 2019 +0000
@@ -37,7 +37,7 @@
SHT25::SHT25(PinName sda, PinName scl) : _i2c(sda, scl)
{
- wait_ms(SHT_WAIT_SET);
+ wait_us(SHT_WAIT_US_SET);
softReset();
setPrecision(SHT_PREC_1214);
_temperature = _humidity = NAN;
@@ -61,7 +61,7 @@
if(!_i2c.write(SHT_I2C_ADDR, command, 1, false))
{
- wait_ms(SHT_WAIT_TEMP);
+ wait_us(SHT_WAIT_US_TEMP);
if(!_i2c.read(SHT_I2C_ADDR, rx, 3, false))
return -46.85 + 175.72 * ((((rx[0] << 8) | rx[1]) & 0xFFFC) / 65536.0);
}
@@ -85,7 +85,7 @@
if(!_i2c.write(SHT_I2C_ADDR, command, 1, false))
{
- wait_ms(SHT_WAIT_RH);
+ wait_us(SHT_WAIT_US_RH);
if(!_i2c.read(SHT_I2C_ADDR, rx, 3, false))
return -6.0 + 125.0 * ((((rx[0] << 8) | rx[1]) & 0xFFFC) / 65536.0);
}
@@ -120,7 +120,7 @@
if(!_i2c.write(SHT_I2C_ADDR, command, 2, false))
{
- wait_ms(SHT_WAIT_SET);
+ wait_us(SHT_WAIT_US_SET);
return true;
}
return false;
@@ -132,7 +132,7 @@
if (!_i2c.write(SHT_I2C_ADDR, command, 1, false))
{
- wait_ms(SHT_WAIT_SET);
+ wait_us(SHT_WAIT_US_SET);
return true;
}
return false;
@@ -141,7 +141,7 @@
void SHT25::waitSafeHeat(void)
{
while(!_selfHeatTemperature || !_selfHeatHumidity)
- wait_ms(SHT_WAIT_SET);
+ wait_us(SHT_WAIT_US_SET);
}
void SHT25::keepSafeTemperature(void)