[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/sht11 SensirionSht11.h, 1.2, 1.3 SensirionSht11ReaderP.nc, 1.4, 1.5

Gilman Tolle gtolle at users.sourceforge.net
Fri Apr 13 14:46:20 PDT 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/sht11
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv25031/chips/sht11

Modified Files:
	SensirionSht11.h SensirionSht11ReaderP.nc 
Log Message:
Added DeviceMetadata interface to telosb sensors.

Index: SensirionSht11.h
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/sht11/SensirionSht11.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** SensirionSht11.h	12 Jul 2006 17:01:57 -0000	1.2
--- SensirionSht11.h	13 Apr 2007 21:46:18 -0000	1.3
***************
*** 36,39 ****
--- 36,44 ----
  
  enum {
+   SHT11_TEMPERATURE_BITS = 14,
+   SHT11_HUMIDITY_BITS = 12,
+ };
+ 
+ enum {
    SHT11_STATUS_LOW_RES_BIT = 1 << 0,
    SHT11_STATUS_NO_RELOAD_BIT = 1 << 1,

Index: SensirionSht11ReaderP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/sht11/SensirionSht11ReaderP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SensirionSht11ReaderP.nc	12 Dec 2006 18:23:12 -0000	1.4
--- SensirionSht11ReaderP.nc	13 Apr 2007 21:46:18 -0000	1.5
***************
*** 41,46 ****
--- 41,50 ----
   */
  
+ #include <SensirionSht11.h>
+ 
  generic module SensirionSht11ReaderP() {
+   provides interface DeviceMetadata as TemperatureMetadata;
    provides interface Read<uint16_t> as Temperature;
+   provides interface DeviceMetadata as HumidityMetadata;
    provides interface Read<uint16_t> as Humidity;
    
***************
*** 51,54 ****
--- 55,61 ----
  }
  implementation {
+ 
+   command uint8_t TemperatureMetadata.getSignificantBits() { return SHT11_TEMPERATURE_BITS; }
+ 
    command error_t Temperature.read() {
      call TempResource.request();
***************
*** 69,72 ****
--- 76,81 ----
    }
  
+   command uint8_t HumidityMetadata.getSignificantBits() { return SHT11_HUMIDITY_BITS; }
+ 
    command error_t Humidity.read() {
      call HumResource.request();



More information about the Tinyos-2-commits mailing list