]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
AnemometerReadC changes
authorsmckown <smckown@4bc1554a-c7f2-4f65-a403-e0be01f0239c>
Mon, 9 Nov 2009 19:30:55 +0000 (19:30 +0000)
committerR. Steve McKown <rsmckown@gmail.com>
Tue, 1 Dec 2009 03:01:50 +0000 (20:01 -0700)
* Replace interface AsyncGet with Get.
* Change interface Count name to Revolutions.

tos/platforms/tmirws/sensors/AnemometerReadC.nc
tos/platforms/tmirws/sensors/AnemometerReadP.nc

index e454adb172a6c41df19bd8b94e0cacbe6a4f8736..22e291b2d02716e9b740c6c4755cfabe014ba40a 100644 (file)
@@ -28,7 +28,7 @@
  */
  
 /**
- * Instantaneous anemometer read; depends upon prior call for correct timing.
+ * Returns the number of anemometer revolutions since the last read.
  * 
  * @author R. Steve McKown <rsmckown@gmail.com>
  */
 configuration AnemometerReadC {
   provides {
     interface StdControl;
-    interface AsyncGet<uint16_t> as Count;
+    interface Get<uint16_t> as Revolutions;
   }
 }
 implementation {
-  components MainC;
-  MainC.SoftwareInit -> AnemometerReadP.Init;
-
   components AnemometerReadP;
   StdControl = AnemometerReadP;
-  Count = AnemometerReadP;
+  Revolutions = AnemometerReadP;
+
+  components MainC;
+  MainC.SoftwareInit -> AnemometerReadP.Init;
 
   components Msp430CounterMicroC;
   AnemometerReadP.SpinCounter -> Msp430CounterMicroC;
index 3b4a54507c9d655cc33f85f9fbc10715661648a8..ef8a5e83255abbcdaa6818df266e9a769efcf419 100644 (file)
@@ -28,7 +28,7 @@
  */
  
 /**
- * Instantaneous anemometer read; depends upon prior call for correct timing.
+ * Returns the number of anemometer revolutions since the last read.
  * 
  * @author R. Steve McKown <rsmckown@gmail.com>
  */
@@ -39,7 +39,7 @@ module AnemometerReadP {
   provides {
     interface Init;
     interface StdControl;
-    interface AsyncGet<uint16_t> as Count;
+    interface Get<uint16_t> as Revolutions;
   }
   uses
     interface Counter<TMicro,uint16_t> as SpinCounter;
@@ -74,7 +74,7 @@ implementation {
     atomic TACTL &= ~(MC1|MC0);
   }
 
-  async command uint16_t Count.get()
+  command uint16_t Revolutions.get()
   {
     atomic {
       uint16_t newCount;