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>;
}
}
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;
}
// 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;
*/
#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__
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;
}
#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