[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/serial HdlcTranslateC.nc, 1.4, 1.5 SerialDispatcherC.nc, 1.4, 1.5 SerialP.nc, 1.4, 1.5

Ben Greenstein bengreenstein at users.sourceforge.net
Wed Jan 24 09:17:04 PST 2007


Update of /cvsroot/tinyos/tinyos-2.x/tos/lib/serial
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv22502

Modified Files:
	HdlcTranslateC.nc SerialDispatcherC.nc SerialP.nc 
Log Message:
added SerialFlush interface to SerialP.


Index: HdlcTranslateC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/HdlcTranslateC.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** HdlcTranslateC.nc	12 Dec 2006 18:23:31 -0000	1.4
--- HdlcTranslateC.nc	24 Jan 2007 17:17:01 -0000	1.5
***************
*** 115,117 ****
--- 115,118 ----
  
    async event void UartStream.receiveDone( uint8_t* buf, uint16_t len, error_t error ) {}
+ 
  }

Index: SerialDispatcherC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/SerialDispatcherC.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SerialDispatcherC.nc	12 Dec 2006 18:23:31 -0000	1.4
--- SerialDispatcherC.nc	24 Jan 2007 17:17:01 -0000	1.5
***************
*** 66,71 ****
    SerialP.SerialFrameComm -> HdlcTranslateC;
    SerialP.SerialControl -> PlatformSerialC;
! 
    HdlcTranslateC.UartStream -> PlatformSerialC;
  
  }
--- 66,72 ----
    SerialP.SerialFrameComm -> HdlcTranslateC;
    SerialP.SerialControl -> PlatformSerialC;
!   //  SerialP.SerialFlush -> PlatformSerialC;
    HdlcTranslateC.UartStream -> PlatformSerialC;
+   
  
  }

Index: SerialP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/serial/SerialP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** SerialP.nc	12 Dec 2006 18:23:32 -0000	1.4
--- SerialP.nc	24 Jan 2007 17:17:01 -0000	1.5
***************
*** 71,74 ****
--- 71,75 ----
      interface Leds;
      interface StdControl as SerialControl;
+     interface SerialFlush;
    }
  }
***************
*** 322,330 ****
    }
  
    task void stopDoneTask() {
      call SerialControl.stop();
      signal SplitControl.stopDone(SUCCESS);
    }
!   
    command error_t SplitControl.start() {
      post startDoneTask();
--- 323,343 ----
    }
  
+ 
    task void stopDoneTask() {
+     call SerialFlush.flush();
+   }
+ 
+   event void SerialFlush.flushDone(){
      call SerialControl.stop();
      signal SplitControl.stopDone(SUCCESS);
    }
! 
!   task void defaultSerialFlushTask(){
!     signal SerialFlush.flushDone();
!   }
!   default command void SerialFlush.flush(){
!     post defaultSerialFlushTask();
!   }
! 
    command error_t SplitControl.start() {
      post startDoneTask();



More information about the Tinyos-2-commits mailing list