[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/tda5250/mac RedMacP.nc, 1.4, 1.5 RedMacC.nc, 1.3, 1.4

akoepke andreaskoepke at users.sourceforge.net
Sat Mar 10 14:14:23 PST 2007


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

Modified Files:
	RedMacP.nc RedMacC.nc 
Log Message:
removed bug that could stop the MAC from operating. Lesson re-learned: 
a splitphase call may trigger the done event before the call returns -- hence:
make sure that all state that the done event uses is initialized befor the call.

instrumented for debug over serial line


Index: RedMacP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/RedMacP.nc,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** RedMacP.nc	27 Feb 2007 19:18:24 -0000	1.4
--- RedMacP.nc	10 Mar 2007 22:14:21 -0000	1.5
***************
*** 40,44 ****
  #include "RedMac.h"
  
- // #define MACM_DEBUG                    // debug...
  module RedMacP {
      provides {
--- 40,43 ----
***************
*** 76,84 ****
          interface Counter<T32khz,uint16_t> as Counter32khz16;
          async command am_addr_t amAddress();
[...1194 lines suppressed...]
!             storeOldState(145);
              call ChannelMonitorControl.updateNoiseFloor();            
          }
          else {
!             storeOldState(146);
              post ReleaseAdcTask();
          }
--- 1207,1218 ----
          atomic ms = macState;
          if(ms < SLEEP) {
!             // sdDebug(300);
          }
          else if(ms == INIT) {
!             // sdDebug(301);
              call ChannelMonitorControl.updateNoiseFloor();            
          }
          else {
!             // sdDebug(302);
              post ReleaseAdcTask();
          }

Index: RedMacC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/tda5250/mac/RedMacC.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** RedMacC.nc	24 Jan 2007 19:40:27 -0000	1.3
--- RedMacC.nc	10 Mar 2007 22:14:21 -0000	1.4
***************
*** 34,37 ****
--- 34,38 ----
   */
  
+ // #define REDMAC_DEBUG
  
  configuration RedMacC {
***************
*** 102,105 ****
--- 103,110 ----
      RedMacP.Led3 -> PlatformLedsC.Led3;
  */
+ #ifdef REDMAC_DEBUG
+     components new SerialDebugC() as SD;
+     RedMacP.SerialDebug -> SD;
+ #endif
  }
  



More information about the Tinyos-2-commits mailing list