[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/xe1205 XE1205SendReceiveC.nc, 1.1.2.1, 1.1.2.2 XE1205SendReceiveP.nc, 1.1.2.1, 1.1.2.2

Henri DF henridf at users.sourceforge.net
Wed Sep 13 03:44:02 PDT 2006


Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/xe1205
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv21943

Modified Files:
      Tag: tinyos-2_0_devel-BRANCH
	XE1205SendReceiveC.nc XE1205SendReceiveP.nc 
Log Message:
add a SplitControl, that wraps the underlying SplitControl of the PHY

Index: XE1205SendReceiveC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/xe1205/XE1205SendReceiveC.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** XE1205SendReceiveC.nc	24 Apr 2006 16:06:48 -0000	1.1.2.1
--- XE1205SendReceiveC.nc	13 Sep 2006 10:43:59 -0000	1.1.2.2
***************
*** 40,44 ****
      provides interface Packet;
      provides interface PacketAcknowledgements;
!     provides interface SplitControl;
      provides interface Receive;
  }
--- 40,44 ----
      provides interface Packet;
      provides interface PacketAcknowledgements;
!     provides interface SplitControl @atleastonce();
      provides interface Receive;
  }
***************
*** 50,57 ****
    Packet = XE1205SendReceiveP;
    PacketAcknowledgements = XE1205SendReceiveP;
  
    components XE1205PhyC;
    XE1205SendReceiveP.XE1205PhyRxTx -> XE1205PhyC;
!   SplitControl = XE1205PhyC;
  }
  
--- 50,58 ----
    Packet = XE1205SendReceiveP;
    PacketAcknowledgements = XE1205SendReceiveP;
+   SplitControl = XE1205SendReceiveP;
  
    components XE1205PhyC;
    XE1205SendReceiveP.XE1205PhyRxTx -> XE1205PhyC;
!   XE1205SendReceiveP.PhySplitControl -> XE1205PhyC;
  }
  

Index: XE1205SendReceiveP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/xe1205/XE1205SendReceiveP.nc,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
diff -C2 -d -r1.1.2.1 -r1.1.2.2
*** XE1205SendReceiveP.nc	24 Apr 2006 16:06:48 -0000	1.1.2.1
--- XE1205SendReceiveP.nc	13 Sep 2006 10:43:59 -0000	1.1.2.2
***************
*** 41,45 ****
--- 41,48 ----
      provides interface PacketAcknowledgements;
      provides interface Receive;
+     provides interface SplitControl @atleastonce();;
+ 
      uses interface XE1205PhyRxTx;
+     uses interface SplitControl as PhySplitControl;
  }
  implementation {
***************
*** 71,77 ****
    norace uint8_t txWhiteByte;
  
- 
- 
- 
    uint8_t const pktPreamble[] = {
      0x55, 0x55, 0x55,
--- 74,77 ----
***************
*** 109,112 ****
--- 109,143 ----
    }
  
+ 
+   command error_t SplitControl.start() {
+     error_t err;
+     err = call PhySplitControl.start();
+ 
+     return err;
+   }
+ 
+   command error_t SplitControl.stop() {
+     error_t err;
+ 
+     // One could also argue that this is split phase so should cope and do the right thing.
+     // Or one could argue that whatever the phy is doing underneath just gets interrupted.
+     if (call XE1205PhyRxTx.busy()) return EBUSY;
+ 
+     err = call PhySplitControl.stop();
+ 
+     return err;
+ 
+   }
+ 
+   event void PhySplitControl.startDone(error_t error) {
+     signal SplitControl.startDone(error);
+   }
+ 
+   event void PhySplitControl.stopDone(error_t error) { 
+     signal SplitControl.stopDone(error);
+   }
+ 
+ 
+ 
    command error_t Send.cancel(message_t* msg) {
      /* Cancel is unsupported for now. */
***************
*** 140,144 ****
--- 171,178 ----
  
      if (txMsgPtr) return EBUSY;
+ 
      if (call XE1205PhyRxTx.busy()) return EBUSY;
+     if (call XE1205PhyRxTx.off()) return EOFF;
+ 
  
      txWhiteByte++;



More information about the Tinyos-2-commits mailing list