[Tinyos-beta-commits] CVS: tinyos-1.x/beta/platform/pxa27x ResetC.nc, 1.1, 1.2 PXA27XWatchdogM.nc, 1.1, 1.2 PXA27XWatchdog.nc, 1.1, 1.2 HPLWatchdogM.nc, 1.1, 1.2

Lama Nachman lnachman at users.sourceforge.net
Sun Sep 25 18:05:58 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2942

Modified Files:
	ResetC.nc PXA27XWatchdogM.nc PXA27XWatchdog.nc HPLWatchdogM.nc 
Log Message:
Added the Reset interface to PXA27XWatchdog.  Disallowed a watchdog reset
after a mote reset is requested.


Index: ResetC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/ResetC.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** ResetC.nc	21 Sep 2005 08:29:25 -0000	1.1
--- ResetC.nc	26 Sep 2005 01:05:56 -0000	1.2
***************
*** 41,45 ****
   */
  
! module ResetC
  {
    provides interface Reset;
--- 41,45 ----
   */
  
! configuration ResetC
  {
    provides interface Reset;
***************
*** 48,52 ****
  implementation
  {
!   components HPLWatchdogM;
!   Reset.reset = HPLWatchdogM.reset;
  }
--- 48,53 ----
  implementation
  {
!   components PXA27XWatchdogM;
! 
!   Reset = PXA27XWatchdogM;
  }

Index: PXA27XWatchdogM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/PXA27XWatchdogM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PXA27XWatchdogM.nc	21 Sep 2005 08:29:25 -0000	1.1
--- PXA27XWatchdogM.nc	26 Sep 2005 01:05:56 -0000	1.2
***************
*** 42,45 ****
--- 42,46 ----
  module PXA27XWatchdogM {
    provides interface PXA27XWatchdog;
+   provides interface Reset;
  }
  
***************
*** 51,54 ****
--- 52,61 ----
  
  
+   bool resetMoteRequest;
+ 
+   command void PXA27XWatchdog.init() {
+      resetMoteRequest = FALSE;
+   }
+ 
    command void PXA27XWatchdog.enableWDT(uint32_t interval) {
       OSMR3 = OSCR0 + interval;
***************
*** 58,66 ****
  
    command void PXA27XWatchdog.feedWDT(uint32_t interval) {
!      OSMR3 = OSCR0 + interval;
!    }
  
!   command void PXA27XWatchdog.resetMote() {
       // Set to short timeout and block to ensure reset
       OSMR3 = OSCR0 + RESET_DELAY;
       OWER = 1;
--- 65,76 ----
  
    command void PXA27XWatchdog.feedWDT(uint32_t interval) {
!      if (!resetMoteRequest) {
!         OSMR3 = OSCR0 + interval;
!      }
!   }
  
!   command void Reset.reset() {
       // Set to short timeout and block to ensure reset
+      resetMoteRequest = TRUE;
       OSMR3 = OSCR0 + RESET_DELAY;
       OWER = 1;

Index: PXA27XWatchdog.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/PXA27XWatchdog.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** PXA27XWatchdog.nc	21 Sep 2005 08:29:25 -0000	1.1
--- PXA27XWatchdog.nc	26 Sep 2005 01:05:56 -0000	1.2
***************
*** 44,72 ****
  {
    /**
!    * Start the watchdog timer, once started it can't be stopped.
     *
!    * @param interval The interval is specified in increments of 1/3.25MHz
     *
     * @return none
     **/
!   command void enableWDT(uint32_t interval);
  
    /**
!    * Feed the dog
     *
!    * @param interval replenish interval specified in increments of 1/3.25MHz
     *
     * @return none
     **/
!   command void feedWDT(uint32_t interval);
  
    /**
!    * Reset the node
     *
!    * @param none
     *
     * @return none
     **/
!   command void resetMote();
  
  }
--- 44,72 ----
  {
    /**
!    * initialize
     *
!    * @param none
     *
     * @return none
     **/
!   command void init();
  
    /**
!    * Start the watchdog timer, once started it can't be stopped.
     *
!    * @param interval The interval is specified in increments of 1/3.25MHz
     *
     * @return none
     **/
!   command void enableWDT(uint32_t interval);
  
    /**
!    * Feed the dog
     *
!    * @param interval replenish interval specified in increments of 1/3.25MHz
     *
     * @return none
     **/
!   command void feedWDT(uint32_t interval);
  
  }

Index: HPLWatchdogM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/platform/pxa27x/HPLWatchdogM.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HPLWatchdogM.nc	21 Sep 2005 08:29:25 -0000	1.1
--- HPLWatchdogM.nc	26 Sep 2005 01:05:56 -0000	1.2
***************
*** 51,60 ****
--- 51,63 ----
  
      command result_t StdControl.init() {
+         call PXA27XWatchdog.init();
  	return SUCCESS;
      }
+ 
      command result_t StdControl.start() {
          call PXA27XWatchdog.enableWDT(WDT_ONE_SEC);
  	return SUCCESS;
      }
+ 
      command result_t StdControl.stop() {
          // can't stop WDT



More information about the Tinyos-beta-commits mailing list