]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/chips/tda5250/mac/CsmaMacC.nc
solve dependencies on baudrate automagically
[tinyos-2.x.git] / tos / chips / tda5250 / mac / CsmaMacC.nc
index 4a246cbec90ebc26d92e6aa5936918d256c4fdb3..1b2cfba4db52ce624549e6c05e67f2bdba7f370a 100644 (file)
  * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
-*/
+ */
 
 /**
- * Confuguration for the CsmaMac.
+ * Configuration for the CsmaMac.
  *
  * @author: Kevin Klues (klues@tkn.tu-berlin.de)
  * @author: Andreas Koepke (koepke@tkn.tu-berlin.de)
  * @author: Philipp Huppertz (huppertz@tkn.tu-berlin.de)
  */
+
+// #define MAC_DEBUG
 configuration CsmaMacC {
   provides {
     interface SplitControl;
     interface MacSend;
     interface MacReceive;
+    interface Packet;
   }
   uses {
     interface PhySend as PacketSend;
     interface PhyReceive as PacketReceive;
-        
+    interface Packet as SubPacket;
     interface Tda5250Control;  
     interface UartPhyControl;
+    interface RadioTimeStamping;
   }
 }
 implementation {
   components  MainC,
+      Tda5250RadioC,    
       CsmaMacP,
       RssiFixedThresholdCMC as Cca,
-      new Alarm32khzC() as Timer,
-      RandomLfsrC,
-      PlatformLedsC;
+      new Alarm32khz16C() as Timer,
+      new TimerMilliC() as ReRxTimer,
+      DuplicateC,
+      TimeDiffC,
+      LocalTimeC,
+      RandomLfsrC
+#ifdef MAC_DEBUG
+      ,PlatformLedsC
+#endif
+      ;
               
     MainC.SoftwareInit -> CsmaMacP;
-              
+    
     SplitControl = CsmaMacP;
     
     MacSend = CsmaMacP;
     MacReceive = CsmaMacP;
     Tda5250Control = CsmaMacP;
     UartPhyControl = CsmaMacP;
+    RadioTimeStamping = CsmaMacP;
     
+    CsmaMacP = Packet;
+    CsmaMacP = SubPacket;
     CsmaMacP = PacketSend;
     CsmaMacP = PacketReceive;
     
@@ -73,12 +87,28 @@ implementation {
     CsmaMacP.ChannelMonitor -> Cca.ChannelMonitor;
     CsmaMacP.ChannelMonitorData -> Cca.ChannelMonitorData;
     CsmaMacP.ChannelMonitorControl -> Cca.ChannelMonitorControl;
+    CsmaMacP.RssiAdcResource -> Cca.RssiAdcResource;
+
+    components ActiveMessageAddressC;
+    CsmaMacP.amAddress -> ActiveMessageAddressC;
+
     CsmaMacP.Random -> RandomLfsrC;
 
+    CsmaMacP.RadioResourceRequested -> Tda5250RadioC.ResourceRequested;
+
     CsmaMacP.Timer -> Timer;
+
+    CsmaMacP.ReRxTimer -> ReRxTimer;
+
+    CsmaMacP.Duplicate -> DuplicateC;
+    CsmaMacP.TimeDiff16 -> TimeDiffC;
+    CsmaMacP.LocalTime32kHz -> LocalTimeC;
+
+#ifdef MAC_DEBUG
     CsmaMacP.Led0 -> PlatformLedsC.Led0;
     CsmaMacP.Led1 -> PlatformLedsC.Led1;
     CsmaMacP.Led2 -> PlatformLedsC.Led2;
     CsmaMacP.Led3 -> PlatformLedsC.Led3;
+#endif    
 }