]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/tda5250/mac/RedMacC.nc
- instrumented for performance evaluation
[tinyos-2.x.git] / tos / chips / tda5250 / mac / RedMacC.nc
index 0a03aa56da9ab7a6d0d72520b638909147912e82..469fe5ce431e612f256471973fd93b5d3b44cff0 100644 (file)
  * ========================================================================
  */
 
+// #define REDMAC_DEBUG
+
+#ifdef REDMAC_PERFORMANCE
+#include <Performance.h>
+#endif
 
 configuration RedMacC {
   provides {
@@ -41,7 +46,7 @@ configuration RedMacC {
     interface MacReceive;
     interface Packet;
     interface LocalTime<T32khz> as LocalTime;
-    interface SleepTime;
+    interface Sleeptime;
     interface ChannelCongestion;
   }
   uses {
@@ -80,7 +85,7 @@ implementation {
     RedMacP = PacketReceive;
     RedMacP = SubPacket;
     RedMacP = Packet;
-    RedMacP = SleepTime;
+    RedMacP = Sleeptime;
     
     RedMacP.CcaStdControl -> Cca.StdControl;
     RedMacP.ChannelMonitor -> Cca.ChannelMonitor;
@@ -94,12 +99,21 @@ implementation {
     RedMacP.Timer -> Timer;
     RedMacP.SampleTimer -> SampleTimer;
     RedMacP.Counter32khz16 -> Counter;
-/*    
-    components PlatformLedsC;
+    
+/*    components PlatformLedsC;
     RedMacP.Led0 -> PlatformLedsC.Led0;
     RedMacP.Led1 -> PlatformLedsC.Led1;
     RedMacP.Led2 -> PlatformLedsC.Led2;
     RedMacP.Led3 -> PlatformLedsC.Led3;
 */
+#ifdef REDMAC_DEBUG
+    components new SerialDebugC() as SD;
+    RedMacP.SerialDebug -> SD;
+#endif
+
+#ifdef REDMAC_PERFORMANCE
+    components new PerformanceC() as Perf;
+    RedMacP.Performance -> Perf;
+#endif
 }