* Author: Miklos Maroti
*/
+#include <HplRF230.h>
+
configuration RF230LayerC
{
provides
{
- interface Init as PlatformInit @exactlyonce();
-
interface RadioState;
interface RadioSend;
interface RadioReceive;
interface RadioCCA;
}
- uses
- {
- interface RF230Config;
- }
+ uses interface RF230Config;
}
implementation
{
- components RF230LayerP, HplRF230C, BusyWaitMicroC, TaskletC, MainC, RadioAlarmC;
-
- PlatformInit = RF230LayerP.PlatformInit;
+ components RF230LayerP, HplRF230C, BusyWaitMicroC, TaskletC, MainC, RadioAlarmC, RF230PacketC, LocalTimeMicroC as LocalTimeRadioC;
RadioState = RF230LayerP;
RadioSend = RF230LayerP;
RF230Config = RF230LayerP;
+ RF230LayerP.PacketLinkQuality -> RF230PacketC.PacketLinkQuality;
+ RF230LayerP.PacketTransmitPower -> RF230PacketC.PacketTransmitPower;
+ RF230LayerP.PacketRSSI -> RF230PacketC.PacketRSSI;
+ RF230LayerP.PacketTimeSyncOffset -> RF230PacketC.PacketTimeSyncOffset;
+ RF230LayerP.PacketTimeStamp -> RF230PacketC;
+ RF230LayerP.LocalTime -> LocalTimeRadioC;
+
RF230LayerP.RadioAlarm -> RadioAlarmC.RadioAlarm[unique("RadioAlarm")];
RadioAlarmC.Alarm -> HplRF230C.Alarm;
#endif
MainC.SoftwareInit -> RF230LayerP.SoftwareInit;
+
+ components RealMainP;
+ RealMainP.PlatformInit -> RF230LayerP.PlatformInit;
}