X-Git-Url: https://oss.titaniummirror.com/gitweb/?a=blobdiff_plain;f=tos%2Fchips%2Fsht11%2FSensirionSht11ReaderP.nc;h=44c59b9183cc207c1ffcff5ca01856e2f9fb6ee7;hb=d32c29caca7c7ae33003c7e0a3a3d3b0ec3620cc;hp=66acc3fd3e48ccfd9912d97183b0ea4a69d9c836;hpb=0fffffea892a816d115acf2fc2d39268f16cc0ea;p=tinyos-2.x.git diff --git a/tos/chips/sht11/SensirionSht11ReaderP.nc b/tos/chips/sht11/SensirionSht11ReaderP.nc index 66acc3fd..44c59b91 100644 --- a/tos/chips/sht11/SensirionSht11ReaderP.nc +++ b/tos/chips/sht11/SensirionSht11ReaderP.nc @@ -40,8 +40,12 @@ * @version $Revision$ $Date$ */ +#include + generic module SensirionSht11ReaderP() { + provides interface DeviceMetadata as TemperatureMetadata; provides interface Read as Temperature; + provides interface DeviceMetadata as HumidityMetadata; provides interface Read as Humidity; uses interface Resource as TempResource; @@ -50,6 +54,9 @@ generic module SensirionSht11ReaderP() { uses interface SensirionSht11 as Sht11Hum; } implementation { + + command uint8_t TemperatureMetadata.getSignificantBits() { return SHT11_TEMPERATURE_BITS; } + command error_t Temperature.read() { call TempResource.request(); return SUCCESS; @@ -68,6 +75,8 @@ implementation { signal Temperature.readDone( result, val ); } + command uint8_t HumidityMetadata.getSignificantBits() { return SHT11_HUMIDITY_BITS; } + command error_t Humidity.read() { call HumResource.request(); return SUCCESS;