]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/tmirws/sensors/HalWindVaneC.nc
Update HalWindVaneC so that it adds dead zone check support and pin init.
[tinyos-2.x.git] / tos / platforms / tmirws / sensors / HalWindVaneC.nc
index 21322ae11e9f2b4e59515f7afa586fb60ccef6d7..46508dbf6cce3ca2c6bf6ff81151b3fcedb6aaa6 100644 (file)
  */
  
 /**
- * HAL layer for the wind vane sensor.
+ * HAL layer for the wind vane sensor provides a power control.
  * 
  * @author R. Steve McKown <rsmckown@gmail.com>
  */
  
-#include "WindVane.h"
-
 configuration HalWindVaneC {
-  provides interface AsyncGet<uint8_t>;
+  provides {
+    interface GeneralIO as WPower;
+    interface GeneralIO as WDead;
+  }
 }
 implementation {
-  components HalWindVaneP;
-  AsyncGet = HalWindVaneP;
+  components new Msp430GpioC() as WPowerM;
+  components new Msp430GpioC() as WDeadM;
+  WPower = WPowerM;
+  WDead = WDeadM;
+
+  components HplMsp430GeneralIOC;
+  WPowerM -> HplMsp430GeneralIOC.Port57;
+  WDeadM -> HplMsp430GeneralIOC.Port56;
 
-  components MainC;
-  MainC.SoftwareInit -> HalWindVaneP.Init;
+  components MainC, HalWindVaneP;
+  MainC.SoftwareInit -> HalWindVaneP;
+  HalWindVaneP.WPower -> HplMsp430GeneralIOC.Port57;
+  HalWindVaneP.WDead -> HplMsp430GeneralIOC.Port56;
 }