From ec026c9e6d938b6ef34f8cc1d62386a7ee237860 Mon Sep 17 00:00:00 2001 From: mmaroti Date: Mon, 30 Nov 2009 21:25:06 +0000 Subject: [PATCH] Use the AM_TIMESYNCMSG name for the active message ID used by all time sync messages --- tos/chips/rf2xx/layers/TimeSyncMessageLayer.h | 4 ++-- tos/chips/rf2xx/layers/TimeSyncMessageLayerC.nc | 6 +++--- tos/chips/rf2xx/layers/TimeSyncMessageLayerP.nc | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tos/chips/rf2xx/layers/TimeSyncMessageLayer.h b/tos/chips/rf2xx/layers/TimeSyncMessageLayer.h index dbb1c10d..7c930a65 100644 --- a/tos/chips/rf2xx/layers/TimeSyncMessageLayer.h +++ b/tos/chips/rf2xx/layers/TimeSyncMessageLayer.h @@ -26,8 +26,8 @@ #include -#ifndef TIMESYNC_AMTYPE -#define TIMESYNC_AMTYPE 0x3D +#ifndef AM_TIMESYNCMSG +#define AM_TIMESYNCMSG 0x3D #endif // this is sent over the air diff --git a/tos/chips/rf2xx/layers/TimeSyncMessageLayerC.nc b/tos/chips/rf2xx/layers/TimeSyncMessageLayerC.nc index 9853aeb2..b1643522 100644 --- a/tos/chips/rf2xx/layers/TimeSyncMessageLayerC.nc +++ b/tos/chips/rf2xx/layers/TimeSyncMessageLayerC.nc @@ -69,14 +69,14 @@ implementation TimeSyncPacketMilli = TimeSyncMessageLayerP; // Ok, we use the AMSenderC infrastructure to avoid concurrent send clashes - components new AMSenderC(TIMESYNC_AMTYPE); + components new AMSenderC(AM_TIMESYNCMSG); TimeSyncMessageLayerP.SubAMSend -> AMSenderC; TimeSyncMessageLayerP.SubAMPacket -> AMSenderC; TimeSyncMessageLayerP.SubPacket -> AMSenderC; components ActiveMessageC; - TimeSyncMessageLayerP.SubReceive -> ActiveMessageC.Receive[TIMESYNC_AMTYPE]; - TimeSyncMessageLayerP.SubSnoop -> ActiveMessageC.Snoop[TIMESYNC_AMTYPE];; + TimeSyncMessageLayerP.SubReceive -> ActiveMessageC.Receive[AM_TIMESYNCMSG]; + TimeSyncMessageLayerP.SubSnoop -> ActiveMessageC.Snoop[AM_TIMESYNCMSG];; PacketTimeStampRadio = TimeSyncMessageLayerP; PacketTimeStampMilli = TimeSyncMessageLayerP; diff --git a/tos/chips/rf2xx/layers/TimeSyncMessageLayerP.nc b/tos/chips/rf2xx/layers/TimeSyncMessageLayerP.nc index e8698976..b7e9b4d2 100644 --- a/tos/chips/rf2xx/layers/TimeSyncMessageLayerP.nc +++ b/tos/chips/rf2xx/layers/TimeSyncMessageLayerP.nc @@ -106,7 +106,7 @@ implementation inline command bool AMPacket.isForMe(message_t* msg) { - return call SubAMPacket.isForMe(msg) && call SubAMPacket.type(msg) == TIMESYNC_AMTYPE; + return call SubAMPacket.isForMe(msg) && call SubAMPacket.type(msg) == AM_TIMESYNCMSG; } inline command am_addr_t AMPacket.destination(message_t* msg) -- 2.39.2