From 59c2be5424c37fe3ef89f65be74dc6e475ae4328 Mon Sep 17 00:00:00 2001 From: kusy Date: Wed, 16 Dec 2009 21:34:43 +0000 Subject: [PATCH] fixing 32khz timesync compile errors; print out error msg --- tos/lib/ftsp/TimeSync32kC.nc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/tos/lib/ftsp/TimeSync32kC.nc b/tos/lib/ftsp/TimeSync32kC.nc index 5d325db0..6eddcd24 100755 --- 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 -- 2.39.2