]> oss.titaniummirror.com Git - tinyos-2.x.git/blobdiff - tos/lib/net/Deluge/ObjectTransferC.nc
Merge TinyOS 2.1.1 into master.
[tinyos-2.x.git] / tos / lib / net / Deluge / ObjectTransferC.nc
index 9db303eb974a15474ca9189b135c2cb2fb653658..72b9db5a56d8d9661e93ceaceccbec0b22ed5c51 100644 (file)
@@ -25,6 +25,7 @@
  */
 
 #include "DelugePageTransfer.h"
+#include "StorageVolumes.h"
 
 configuration ObjectTransferC
 {
@@ -32,22 +33,20 @@ configuration ObjectTransferC
   uses {
     interface BlockRead[uint8_t img_num];
     interface BlockWrite[uint8_t img_num];
+    interface Leds;
   }
 }
 
 implementation
 {
   components ObjectTransferP, DelugePageTransferC;
+  components CrcC;
   
   ObjectTransfer = ObjectTransferP;
-  BlockRead[0] = DelugePageTransferC.BlockRead[0];
-  BlockWrite[0] = DelugePageTransferC.BlockWrite[0];
-  BlockRead[1] = DelugePageTransferC.BlockRead[1];
-  BlockWrite[1] = DelugePageTransferC.BlockWrite[1];
+  DelugePageTransferC.BlockRead = BlockRead;
+  DelugePageTransferC.BlockWrite = BlockWrite;
   ObjectTransferP.DelugePageTransfer -> DelugePageTransferC.DelugePageTransfer;
-  
-  components CrcP;
-  ObjectTransferP.Crc -> CrcP.Crc;
+  ObjectTransferP.Crc -> CrcC.Crc;
   
   components new AMSenderC(AM_DELUGEADVMSG) as SendAdvMsg, 
              new AMReceiverC(AM_DELUGEADVMSG) as ReceiveAdvMsg,
@@ -63,12 +62,9 @@ implementation
   DelugePageTransferC.SendDataMsg -> SendDataMsg;
   DelugePageTransferC.ReceiveDataMsg -> ReceiveDataMsg;
   DelugePageTransferC.AMPacket -> SendDataMsg;
+  DelugePageTransferC.Leds = Leds;
   
-  ObjectTransferP.BlockWrite[0] = BlockWrite[0];
-  ObjectTransferP.BlockWrite[1] = BlockWrite[1];
-  
-  components MainC, LedsC, NoLedsC;
-  ObjectTransferP.Leds -> NoLedsC;
+  ObjectTransferP.BlockWrite = BlockWrite;
   
   components RandomC, new TimerMilliC() as Timer;
   ObjectTransferP.Random -> RandomC;