]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/platforms/eyesIFX/byte_radio/RssiFixedThresholdCMC.nc
instrument for debug
[tinyos-2.x.git] / tos / platforms / eyesIFX / byte_radio / RssiFixedThresholdCMC.nc
index f3b3add6ee4f0a33611525b5fec8ce48df7e607f..a2f70ad9dfc4b805bf25a2c4255f5350ca9e4e5a 100644 (file)
@@ -32,7 +32,9 @@
  * Configuration for the fixed Rssi Threshold module.
  *
  * @author: Kevin Klues (klues@tkn.tu-berlin.de)
+ * @author: Andreas Koepke (koepke@tkn.tu-berlin.de)
  */
+// #define RSSI_FIXED_DEBUG
 configuration RssiFixedThresholdCMC
 {
     provides {
@@ -41,6 +43,7 @@ configuration RssiFixedThresholdCMC
         interface ChannelMonitorControl;
         interface ChannelMonitorData;
         interface BatteryLevel;
+        interface Resource as RssiAdcResource;
     }    
 }
 implementation
@@ -48,22 +51,24 @@ implementation
     components RssiFixedThresholdCMP,
         new RssiSensorVccC() as Rssi,
         new BatteryLevelSensorC() as Voltage,
-        // PlatformLedsC,
         new TimerMilliC() as Timer,
         MainC;
 
     MainC.SoftwareInit -> RssiFixedThresholdCMP;
     StdControl = RssiFixedThresholdCMP;
-
+    RssiAdcResource = Rssi;
+    
     RssiFixedThresholdCMP.Rssi -> Rssi;
-    // RssiFixedThresholdCMP.RssiAdcResource -> Rssi;
-
     RssiFixedThresholdCMP.Voltage -> Voltage;
 
     ChannelMonitor = RssiFixedThresholdCMP;
     ChannelMonitorControl = RssiFixedThresholdCMP;
     ChannelMonitorData = RssiFixedThresholdCMP;
     BatteryLevel = RssiFixedThresholdCMP;
-    // RssiFixedThresholdCMP.Led3 -> PlatformLedsC.Led3;
+
     RssiFixedThresholdCMP.Timer -> Timer;    
+#ifdef RSSI_FIXED_DEBUG
+    components new SerialDebugC() as SD;
+    RssiFixedThresholdCMP.SerialDebug -> SD;
+#endif
 }