X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fchips%2Fcc1000%2FCC1000CsmaRadioC.nc;h=a04333660cf7f9073c4a0bb6fe26bcc3a9a5b74c;hp=faa5d80e2dcd928dbcb8df5c830e59d5353d2472;hb=e9bfab607e051bae6afb47b44892ce37541d1b44;hpb=adf1de6c009d13b7b52e68535c63b28f59c97400 diff --git a/tos/chips/cc1000/CC1000CsmaRadioC.nc b/tos/chips/cc1000/CC1000CsmaRadioC.nc index faa5d80e..a0433366 100644 --- a/tos/chips/cc1000/CC1000CsmaRadioC.nc +++ b/tos/chips/cc1000/CC1000CsmaRadioC.nc @@ -1,4 +1,4 @@ -/* $Id$ +/* * "Copyright (c) 2000-2005 The Regents of the University of California. * All rights reserved. * @@ -44,6 +44,7 @@ * * @author Joe Polastre * @author David Gay + * @author Marco Langerwisch (Packet timestamping) */ #include "CC1000Const.h" @@ -55,14 +56,17 @@ configuration CC1000CsmaRadioC { interface Send; interface Receive; - interface Packet; + interface Packet; interface CsmaControl; interface CsmaBackoff; - interface RadioTimeStamping; interface PacketAcknowledgements; interface LinkPacketMetadata; - + interface LowPowerListening; + + interface PacketTimeStamp as PacketTimeStamp32khz; + interface PacketTimeStamp as PacketTimeStampMilli; + interface PacketTimeSyncOffset; } } implementation { @@ -86,10 +90,9 @@ implementation { CsmaControl = Csma; CsmaBackoff = Csma; LowPowerListening = Csma; - RadioTimeStamping = SendReceive; PacketAcknowledgements = SendReceive; LinkPacketMetadata = SendReceive; - + Csma.CC1000Control -> Control; Csma.Random -> RandomC; Csma.CC1000Squelch -> Squelch; @@ -103,7 +106,7 @@ implementation { SendReceive.amAddress -> ActiveMessageAddressC; SendReceive.RssiRx -> Rssi.Rssi[unique(UQ_CC1000_RSSI)]; SendReceive.CC1000Squelch -> Squelch; - + Csma.RssiNoiseFloor -> Rssi.Rssi[unique(UQ_CC1000_RSSI)]; Csma.RssiCheckChannel -> Rssi.Rssi[unique(UQ_CC1000_RSSI)]; Csma.RssiPulseCheck -> Rssi.Rssi[unique(UQ_CC1000_RSSI)]; @@ -114,4 +117,16 @@ implementation { Rssi.Resource -> Hpl; Control.CC -> Hpl; Control.BusyWait -> BusyWaitMicroC; + + PacketTimeStamp32khz = SendReceive; + PacketTimeStampMilli = SendReceive; + PacketTimeSyncOffset = SendReceive; + + components Counter32khz32C, new CounterToLocalTimeC(T32khz); + CounterToLocalTimeC.Counter -> Counter32khz32C; + SendReceive.LocalTime32khz -> CounterToLocalTimeC; + + //DummyTimer is introduced to compile apps that use no timers + components HilTimerMilliC, new TimerMilliC() as DummyTimer; + SendReceive.LocalTimeMilli -> HilTimerMilliC; }