X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Flib%2Fftsp%2FTimeSync32kC.nc;h=6eddcd24db3447953a1ebf374f3b8019150c7b43;hp=f709829eeefb1b037ce1568e47789ad24a1285f2;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/lib/ftsp/TimeSync32kC.nc b/tos/lib/ftsp/TimeSync32kC.nc old mode 100644 new mode 100755 index f709829e..6eddcd24 --- a/tos/lib/ftsp/TimeSync32kC.nc +++ b/tos/lib/ftsp/TimeSync32kC.nc @@ -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