[Tinyos-2-commits] CVS: tinyos-2.x/tos/lib/printf PrintfP.nc, 1.13, 1.14

Chieh-Jan Mike Liang liang_mike at users.sourceforge.net
Tue Jul 8 22:16:18 PDT 2008


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

Modified Files:
	PrintfP.nc 
Log Message:
Make sure that Printf was the one that started serial before running the code inside SerialControl.startDone


Index: PrintfP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/lib/printf/PrintfP.nc,v
retrieving revision 1.13
retrieving revision 1.14
diff -C2 -d -r1.13 -r1.14
*** PrintfP.nc	2 Jul 2008 18:46:18 -0000	1.13
--- PrintfP.nc	9 Jul 2008 05:16:16 -0000	1.14
***************
*** 112,120 ****
  
    event void SerialControl.startDone(error_t error) {
  #ifdef _H_atmega128hardware_H
!     stdout = &atm128_stdout;
  #endif
!     atomic state = S_STARTED;
!     signal Boot.booted();
    }
  
--- 112,122 ----
  
    event void SerialControl.startDone(error_t error) {
+     if (state == S_STOPPED) {
  #ifdef _H_atmega128hardware_H
!       stdout = &atm128_stdout;
  #endif
!       atomic state = S_STARTED;
!       signal Boot.booted();
!     }
    }
  



More information about the Tinyos-2-commits mailing list