]> oss.titaniummirror.com Git - tinyos-2.x.git/commitdiff
timesync support
authormmaroti <mmaroti>
Wed, 20 Feb 2008 01:07:04 +0000 (01:07 +0000)
committermmaroti <mmaroti>
Wed, 20 Feb 2008 01:07:04 +0000 (01:07 +0000)
tos/platforms/iris/ActiveMessageC.nc
tos/platforms/iris/MicaTimer.h
tos/platforms/iris/chips/rf230/HplRF230.h
tos/platforms/iris/chips/rf230/HplRF230C.nc
tos/platforms/iris/platform_message.h

index 5515cc26c7464121f5ef5c302b09c9b595f1f841..d23ba3e2706f53546cf17cd21d0dd05b4d4b9747 100644 (file)
@@ -32,7 +32,11 @@ configuration ActiveMessageC
                interface Receive as Snoop[uint8_t id];
                interface Packet;
                interface AMPacket;
-               interface PacketAcknowledgements as Acks;
+
+               interface PacketAcknowledgements;
+               interface PacketField<uint8_t> as PacketLinkQuality;
+               interface PacketTimeStamp<TMicro, uint16_t>;
+               interface PacketTimeSynch<TMicro, uint16_t>;
        }
 }
 
@@ -46,10 +50,9 @@ implementation
        Snoop        = MAC.Snoop;
        Packet       = MAC;
        AMPacket     = MAC;
-       Acks         = MAC;
 
-       // TODO: do these from PlatformC
-//     components RealMainP, HplRF230C, RF230DriverC;
-//     RealMainP.PlatformInit -> HplRF230C.PlatformInit;
-//     RealMainP.PlatformInit -> RF230DriverC.PlatformInit;
+       PacketAcknowledgements = MAC;
+       PacketLinkQuality = MAC;
+       PacketTimeStamp = MAC;
+       PacketTimeSynch = MAC;
 }
index 872becab1ef48059ec5897a10f431a30a9a818d2..be3883e26035a4d761313e551972b118789d3856 100644 (file)
@@ -144,7 +144,7 @@ enum {
 
 // get a 1MHz (1 microsecond resolution) timer for debugging purposes
 
-typedef TMilli TOne;
+typedef TMicro TOne;
 typedef TMicro TThree;
 typedef uint32_t counter_one_overflow_t;
 typedef uint16_t counter_three_overflow_t;
index 822d2d1dc77d4cd34d60be27956295722bb5bc3b..c144173b95278561af987bb77e1782cff3687537 100644 (file)
@@ -57,4 +57,14 @@ typedef TOne TRF230;
  */
 #define RF230_ALARM_MICROSEC   ((7.3728 / MHZ / 32.0) * (1 << MICA_DIVIDE_ONE_FOR_32KHZ_LOG2))
 
+/* This is the default value of the TX_PWR field of the PHY_TX_PWR register. */
+#ifndef RF230_DEF_RFPOWER
+#define RF230_DEF_RFPOWER      0
+#endif
+
+/* This is the default value of the CHANNEL field of the PHY_CC_CCA register. */
+#ifndef RF230_DEF_CHANNEL
+#define RF230_DEF_CHANNEL      11
+#endif
+
 #endif//__HPLRF230_H__
index 2e48b54ff4e762ab1f6c84d9350aa8dee515f7a0..113d47cd7030e53747e70d313afa0b0a4a30b055 100644 (file)
@@ -68,8 +68,6 @@ implementation
        components new AlarmOne16C() as AlarmC;
        Alarm = AlarmC;
 
-       // TODO: do these from PlatformC
-       components RealMainP, RF230LayerC;
+       components RealMainP;
        RealMainP.PlatformInit -> HplRF230P.PlatformInit;
-       RealMainP.PlatformInit -> RF230LayerC.PlatformInit;
 }
index 6e13a8ec11cbf073e85682a33612e0482d49d9da..f966cbd58ac4fa1e9552b55493a016496e1bd52d 100644 (file)
 #ifndef PLATFORM_MESSAGE_H
 #define PLATFORM_MESSAGE_H
 
-#include <DefaultMac.h>
+#include <DefaultPacket.h>
 #include <Serial.h>
 
 typedef union message_header {
-  defaultmac_header_t rf230;
-  serial_header_t serial;
+       defpacket_header_t rf230;
+       serial_header_t serial;
 } message_header_t;
 
 typedef union message_footer {
+       defpacket_footer_t rf230;
 } message_footer_t;
 
 typedef union message_metadata {
-  defaultmac_metadata_t rf230;
-  serial_metadata_t serial;
+       defpacket_metadata_t rf230;
 } message_metadata_t;
 
 #endif