[Tinyos-beta-commits] CVS: tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430 HardwareC.nc, NONE, 1.1 HPLUSART0M.nc, 1.2, 1.3 HPLUSARTControl.nc, 1.1, 1.2 ProgFlashM.nc, 1.2, 1.3

Jonathan Hui jwhui at users.sourceforge.net
Thu Jul 21 11:54:28 PDT 2005


Update of /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv338/msp430

Modified Files:
	HPLUSART0M.nc HPLUSARTControl.nc ProgFlashM.nc 
Added Files:
	HardwareC.nc 
Log Message:
- Added mica2 support to TOSBoot for Deluge 2.0.



--- NEW FILE: HardwareC.nc ---
// $Id: HardwareC.nc,v 1.1 2005/07/21 18:54:25 jwhui Exp $

/*									tab:2
 *
 *
 * "Copyright (c) 2000-2005 The Regents of the University  of California.  
 * All rights reserved.
 *
 * Permission to use, copy, modify, and distribute this software and its
 * documentation for any purpose, without fee, and without written agreement is
 * hereby granted, provided that the above copyright notice, the following
 * two paragraphs and the author appear in all copies of this software.
 * 
 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
 * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
 * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
 * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 * 
 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
 * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
 * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
 *
 */

/**
 * @author Jonathan Hui <jwhui at cs.berkeley.edu>
 */

module HardwareC {
  provides {
    interface Hardware;
  }
}

implementation {

  command void Hardware.init() {
    BCSCTL1 = RSEL0 | RSEL1 | RSEL2;
    DCOCTL = DCO0 | DCO1 | DCO2;
  }
  
  command void Hardware.reboot() {
    WDTCTL = WDT_ARST_1_9;
    while(1);
  }

}

Index: HPLUSART0M.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430/HPLUSART0M.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HPLUSART0M.nc	17 May 2005 20:48:23 -0000	1.2
--- HPLUSART0M.nc	21 Jul 2005 18:54:25 -0000	1.3
***************
*** 1,2 ****
--- 1,31 ----
+ // $Id$
+ 
+ /*									tab:2
+  *
+  *
+  * "Copyright (c) 2000-2005 The Regents of the University  of California.  
+  * All rights reserved.
+  *
+  * Permission to use, copy, modify, and distribute this software and its
+  * documentation for any purpose, without fee, and without written agreement is
+  * hereby granted, provided that the above copyright notice, the following
+  * two paragraphs and the author appear in all copies of this software.
+  * 
+  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
+  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
+  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  * 
+  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
+  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
+  *
+  */
+ 
+ /**
+  * @author Jonathan Hui <jwhui at cs.berkeley.edu>
+  */
  
  module HPLUSART0M {
***************
*** 38,41 ****
--- 67,74 ----
  
    }
+ 
+   command result_t HPLUSARTControl.isTxEmpty(){
+     return (U0TCTL & TXEPT);
+   }
    
    command result_t HPLUSARTControl.isTxIntrPending(){

Index: HPLUSARTControl.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430/HPLUSARTControl.nc,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** HPLUSARTControl.nc	17 May 2005 20:48:24 -0000	1.1
--- HPLUSARTControl.nc	21 Jul 2005 18:54:25 -0000	1.2
***************
*** 1,2 ****
--- 1,31 ----
+ // $Id$
+ 
+ /*									tab:2
+  *
+  *
+  * "Copyright (c) 2000-2005 The Regents of the University  of California.  
+  * All rights reserved.
+  *
+  * Permission to use, copy, modify, and distribute this software and its
+  * documentation for any purpose, without fee, and without written agreement is
+  * hereby granted, provided that the above copyright notice, the following
+  * two paragraphs and the author appear in all copies of this software.
+  * 
+  * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
+  * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
+  * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
+  * CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  * 
+  * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
+  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+  * AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
+  * ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
+  * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS."
+  *
+  */
+ 
+ /**
+  * @author Jonathan Hui <jwhui at cs.berkeley.edu>
+  */
   
  includes msp430usart;
***************
*** 6,9 ****
--- 35,39 ----
    command void disableSPI();
    command void setModeSPI();
+   command result_t isTxEmpty();
    command result_t isTxIntrPending();
    command result_t isRxIntrPending();

Index: ProgFlashM.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/beta/Deluge/Deluge/TOSBoot/msp430/ProgFlashM.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** ProgFlashM.nc	17 May 2005 20:48:24 -0000	1.2
--- ProgFlashM.nc	21 Jul 2005 18:54:25 -0000	1.3
***************
*** 1,8 ****
  // $Id$
  
! /*									tab:4
   *
   *
!  * "Copyright (c) 2000-2004 The Regents of the University  of California.  
   * All rights reserved.
   *
--- 1,8 ----
  // $Id$
  
! /*									tab:2
   *
   *
!  * "Copyright (c) 2000-2005 The Regents of the University  of California.  
   * All rights reserved.
   *
***************
*** 31,35 ****
  module ProgFlashM {
    provides {
!     interface TOSBootProgFlash as ProgFlash;
    }
  }
--- 31,35 ----
  module ProgFlashM {
    provides {
!     interface ProgFlash;
    }
  }
***************
*** 37,40 ****
--- 37,44 ----
  implementation {
  
+   enum {
+     RESET_ADDR = 0xfffe,
+   };
+ 
    command result_t ProgFlash.write(uint32_t addr, uint8_t* buf, uint16_t len) {
  
***************
*** 52,56 ****
      FCTL1 = FWKEY + WRT;
      for (i = 0; i < len / sizeof(uint16_t); i++, flashAddr++) {
!       if ((uint16_t)flashAddr != BL_MSP_RESET_ADDR)
  	*flashAddr = wordBuf[i];
        else
--- 56,60 ----
      FCTL1 = FWKEY + WRT;
      for (i = 0; i < len / sizeof(uint16_t); i++, flashAddr++) {
!       if ((uint16_t)flashAddr != RESET_ADDR)
  	*flashAddr = wordBuf[i];
        else



More information about the Tinyos-beta-commits mailing list