]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/rf230/RF230LayerC.nc
separate the FastSpiInterface from the HplRF230 interface
[tinyos-2.x.git] / tos / chips / rf230 / RF230LayerC.nc
index d50ce40a3cf2d4262a9780ea8186d521b8f73a77..43c1a836def01b5ba8f91bccd2a6f1190ad4a369 100644 (file)
  * 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;
@@ -52,12 +47,19 @@ implementation
 
        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;
 
        RF230LayerP.SELN -> HplRF230C.SELN;
        RF230LayerP.SpiResource -> HplRF230C.SpiResource;
-       RF230LayerP.SpiByte -> HplRF230C;
+       RF230LayerP.FastSpiByte -> HplRF230C;
        RF230LayerP.HplRF230 -> HplRF230C;
 
        RF230LayerP.SLP_TR -> HplRF230C.SLP_TR;
@@ -73,4 +75,7 @@ implementation
 #endif
 
        MainC.SoftwareInit -> RF230LayerP.SoftwareInit;
+
+       components RealMainP;
+       RealMainP.PlatformInit -> RF230LayerP.PlatformInit;
 }