]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/ftsp/TimeSync32kC.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / lib / ftsp / TimeSync32kC.nc
old mode 100644 (file)
new mode 100755 (executable)
index f709829..6eddcd2
@@ -41,6 +41,12 @@ configuration TimeSync32kC
 
 implementation
 {
+#if defined(PLATFORM_MICAZ) || defined(PLATFORM_TELOSB)
+;
+#else
+#error "LPL timesync is not available for your platform"
+#endif
+
   components new TimeSyncP(T32khz) as TimeSyncP;
 
   GlobalTime      =   TimeSyncP;
@@ -53,8 +59,8 @@ implementation
 
   components TimeSyncMessageC as ActiveMessageC;
   TimeSyncP.RadioControl    ->  ActiveMessageC;
-  TimeSyncP.Send            ->  ActiveMessageC.TimeSyncAMSend32khz[AM_TIMESYNCMSG];
-  TimeSyncP.Receive         ->  ActiveMessageC.Receive[AM_TIMESYNCMSG];
+  TimeSyncP.Send            ->  ActiveMessageC.TimeSyncAMSend32khz[TIMESYNC_AM_FTSP];
+  TimeSyncP.Receive         ->  ActiveMessageC.Receive[TIMESYNC_AM_FTSP];
   TimeSyncP.TimeSyncPacket  ->  ActiveMessageC;
 
   components Counter32khz32C, new CounterToLocalTimeC(T32khz) as LocalTime32khzC;
@@ -64,6 +70,9 @@ implementation
   components new TimerMilliC() as TimerC;
   TimeSyncP.Timer ->  TimerC;
 
+  components RandomC;
+  TimeSyncP.Random -> RandomC;
+  
 #if defined(TIMESYNC_LEDS)
   components LedsC;
 #else
@@ -72,8 +81,7 @@ implementation
   TimeSyncP.Leds  ->  LedsC;
 
 #ifdef LOW_POWER_LISTENING
-  components CC2420ActiveMessageC;
-  TimeSyncP.LowPowerListening -> CC2420ActiveMessageC;
+  TimeSyncP.LowPowerListening -> ActiveMessageC;
 #endif