You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(35) |
Aug
(76) |
Sep
(16) |
Oct
(23) |
Nov
(2) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
(5) |
Mar
(8) |
Apr
(13) |
May
(24) |
Jun
|
Jul
(36) |
Aug
(19) |
Sep
|
Oct
|
Nov
(31) |
Dec
(18) |
| 2005 |
Jan
|
Feb
|
Mar
|
Apr
(7) |
May
(4) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Lin Gu <li...@us...> - 2006-07-07 00:10:39
|
Update of /cvsroot/vert/t-kernel/src/sys/t-kernel/t-nucleus In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv2896/src/sys/t-kernel/t-nucleus Modified Files: dispatcher.c naturalizer.c Removed Files: bootAVR.elf bootAVR.lst bootAVR.map Log Message: The previous check in may be wrong. --- bootAVR.lst DELETED --- Index: naturalizer.c =================================================================== RCS file: /cvsroot/vert/t-kernel/src/sys/t-kernel/t-nucleus/naturalizer.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** naturalizer.c 6 Jul 2006 21:57:41 -0000 1.1.1.1 --- naturalizer.c 7 Jul 2006 00:10:29 -0000 1.2 *************** *** 1154,1158 **** input ccRaw output ncNat - // RAW (brne, "l", "111101lllllll001", 1, AVR_ISA_1200, 0xf401) Compatible with brne, brlt, ... --- 1154,1157 ---- *************** *** 1180,1218 **** } // if - // jump back to OS - - /////// todo: check all branches to see sreg is saved after branch's compare - // pleaseWriteUpTown(); - - // works for brcs - // ncNat.codeEntry[ncNat.cWlen++] = (ccRaw.codeEntry[ccRaw.cCur] & 0xfc07) + - // (TKNL_NC_COMETOWN_WSIZE << 3); ncNat.codeEntry[ncNat.cWlen++] = (ccRaw.codeEntry[ccRaw.cCur] & 0xfc07) + (TKNL_NC_FORWARD_WSIZE << 3); - // pleaseComeTown(ncNat.lVPWCStart + ccRaw.cCur + 1); pleaseBridge(ncNat.lVPWCStart + ccRaw.cCur + 1); pleaseBridge(ncNat.lVPWCStart + ccRaw.cCur + cT + 1); - // pleaseAssignLongParam(ncNat.lVPWCStart + ccRaw.cCur + 1); - // writeRjmp(TKNL_NC_COMETOWN_WSIZE); - - //pleaseComeTown(ncNat.lVPWCStart + ccRaw.cCur + cT + 1); - #ifdef TKNL_FREE_JUMP - // pleaseBridge(ncNat.lVPWCStart + ccRaw.cCur + cT + 1); - #else - // pleaseRegulateBranch(cT); - /* if (cT >= 0) - { - pleaseForward(ncNat.lVPWCStart + ccRaw.cCur + cT + 1); - } - else - { - pleaseComeHome(ncNat.lVPWCStart + ccRaw.cCur + cT + 1); - } - */ - #endif - - #ifdef TKNL_DBG_NC_TRANSLATE3 - vdbPrintln4("trBranch ", ncNat.lVPWCStart, ccRaw.cCur, cT, ccRaw.codeEntry[ccRaw.cCur]); - #endif ccRaw.cCur++; --- 1179,1186 ---- *************** *** 2526,2533 **** writeRjmp(2); writeJmp((uint16_t)hellGate); - // pleaseComeHome(ncNat.lVPWCStart + ccRaw.cCur); - // pleaseWriteUpTown(); - // pleaseComeTown(ncNat.lVPWCStart + ccRaw.cCur); - // pleaseForward(ncNat.lVPWCStart + ccRaw.cCur); ccRaw.cCur--; pleaseBridge(ncNat.lVPWCStart + ccRaw.cCur + 1); --- 2494,2497 ---- Index: dispatcher.c =================================================================== RCS file: /cvsroot/vert/t-kernel/src/sys/t-kernel/t-nucleus/dispatcher.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** dispatcher.c 6 Jul 2006 21:57:41 -0000 1.1.1.1 --- dispatcher.c 7 Jul 2006 00:10:29 -0000 1.2 *************** *** 2490,2498 **** "eor r31, r31" "\n\t" "eor r30, r30" "\n\t" - /* "push r29" "\n\t" - "lds r29, cMind" "\n\t" - "ori r29, 0x02" "\n\t" - "sts cMind, r29" "\n\t" - "pop r29" "\n\t" */ : : --- 2490,2493 ---- --- bootAVR.elf DELETED --- --- bootAVR.map DELETED --- |
|
From: Lin Gu <li...@us...> - 2005-05-02 04:38:58
|
Update of /cvsroot/vert/shamrock/src/app/motion/PIR.sown In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8980 Modified Files: makefile Log Message: Now the stand-alone PIR tester can compile Index: makefile =================================================================== RCS file: /cvsroot/vert/shamrock/src/app/motion/PIR.sown/makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** makefile 2 May 2005 04:11:42 -0000 1.1.1.1 --- makefile 2 May 2005 04:38:49 -0000 1.2 *************** *** 1,4 **** COMPONENT=TestPIRClassify ! PFLAGS := $(PFLAGS) -I../../../PLATFORM/XSM2 -I../../ -DDEBUG_PIR -I../../../PLATFORM/COMMON PFLAGS := $(PFLAGS) -I%T/lib/Counters BUILDDIR = build/$(PLATFORM) --- 1,4 ---- COMPONENT=TestPIRClassify ! PFLAGS := $(PFLAGS) -IPLATFORM/XSM2 -DDEBUG_PIR -IPLATFORM/COMMON -I../../common PFLAGS := $(PFLAGS) -I%T/lib/Counters BUILDDIR = build/$(PLATFORM) *************** *** 7,11 **** MAIN_IHEX = $(BUILDDIR)/main.ihex ! include ../../../Makerules - PROGRAMMER_FLAGS_INP=-dprog=mib510 -dserial=$(MIB510) -dpart=ATmega128 \ No newline at end of file --- 7,13 ---- MAIN_IHEX = $(BUILDDIR)/main.ihex ! #include ../../../Makerules ! include Makerules ! ! PROGRAMMER_FLAGS_INP=-dprog=mib510 -dserial=$(MIB510) -dpart=ATmega128 |
|
From: Lin Gu <li...@us...> - 2005-05-02 04:34:05
|
Update of /cvsroot/vert/shamrock/src/app/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8062 Added Files: ClassifiedSensing.nc Log Message: --- NEW FILE: ClassifiedSensing.nc --- includes classification; interface ClassifiedSensing { // Enable this sensor command result_t enableSensor(); /* Disable this sensor. Disabling sensors does not turn off sensors. Sensors need to resume working quickly when they are re-enabled. */ command result_t disableSensor(); // Enable the detection of a specific type of targets. command result_t enableType(TargetType ttToSense); // Disable the detection of a specific type of targets command result_t disableType(TargetType ttNotToSense); // Set the parameters needed for the sensing command result_t setParam(ParamSetting psNewSetting); /* async */ command result_t calibrate(); /* async */ event result_t calibrationDone(); /* Signal that some possible targets are detected. The confidence level of these targets are stored in the structure tcTargets. The report frequency must not exceed a certain limit, which may be adjusted by the application. */ /* async */ event result_t detected(TargetConfidence tcTargets); } |
|
From: Lin Gu <li...@us...> - 2005-05-02 04:14:24
|
Update of /cvsroot/vert/shamrock/src/sys/arch/xsm/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4626/sys/arch/xsm/make Modified Files: xsm.target Log Message: Index: xsm.target =================================================================== RCS file: /cvsroot/vert/shamrock/src/sys/arch/xsm/make/xsm.target,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** xsm.target 19 Apr 2005 03:04:42 -0000 1.1.1.1 --- xsm.target 2 May 2005 04:14:16 -0000 1.2 *************** *** 32,35 **** --- 32,42 ---- endif + ifdef TKER + ifeq ($(TKER),TKER1) + BUILD_DEPS += tknl + AVR_FUSE_H = 0xd8 + endif + endif + xsm: $(BUILD_DEPS) @: |
Update of /cvsroot/vert/shamrock/src/apps/motion/PIR.sown In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4626/apps/motion/PIR.sown Removed Files: Makerules OscopeMsg.h PIRClassify.nc PIRClassifyM.nc TestPIRClassify.nc TestPIRClassifyM.nc makefile Log Message: --- TestPIRClassifyM.nc DELETED --- --- PIRClassifyM.nc DELETED --- --- PIRClassify.nc DELETED --- --- Makerules DELETED --- --- TestPIRClassify.nc DELETED --- --- makefile DELETED --- --- OscopeMsg.h DELETED --- |
|
From: Lin Gu <li...@us...> - 2005-04-20 19:43:23
|
Update of /cvsroot/vert/shamrock/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11162/doc Modified Files: vdb-tutorial.txt Log Message: vdbavr updated Index: vdb-tutorial.txt =================================================================== RCS file: /cvsroot/vert/shamrock/doc/vdb-tutorial.txt,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** vdb-tutorial.txt 20 Apr 2005 19:05:27 -0000 1.1.1.1 --- vdb-tutorial.txt 20 Apr 2005 19:43:01 -0000 1.2 *************** *** 1,31 **** ! README for MagClassify ! Author/Contact: Lin Gu / li...@cs... ! This is a stand-alone application testing the magnetic sensing algorithm. ! Configuration: ! This application depends on some modules which do not exist in the TinyOS source tree. Hence, please configure it before compiling and running the application. ! 1. Set up the SHAMROCKDIR environment variable to the path where the shamrock directory is, e.g.: ! export SHAMROCKDIR=/usr/src/shamrock ! 2. Set up the TOSMAKE_PATH environment variable as follows: ! export TOSMAKE_PATH=$SHAMROCKDIR/src/sys/arch/xsm ! 3. Run "configenv" in the $SHAMROCKDIR directory, e.g., ! ! cd $SHAMROCK ! ./configenv ! Build ! ===== ! Make sure the SHAMROCKDIR and TOSMAKE_PATH is set correctly. ! Build the application as in TinyOS, e.g., ! make xsm --- 1,68 ---- ! Tutorial of VDB ! =============== ! By Lin Gu <li...@cs...>, Liqian Luo <ll...@cs...> ! VDB is a simple utility that help debug TinyOS programs. The best way to learn VDB is by examples. This tutorial provides several short examples with step-by-step descriptions. All the files used are in the shamrock package named "shamrock.tar.gz". This tutorial is applicable to Berkeley Mica2 platforms, like Mica2, XSM1, Exscal, etc. + Example 1: printing debug information to the serial port (UART). ! 1. Make sure the TinyOS environment is set up correctly. ! For example, the TOSDIR environment is correctly set. ! 2. Uncompress the shamrock package, and move the shamrock directory to a desirable location. From this point on, we use SHAMROCKDIR to denote the path to the shamrock directory. ! For example, in a Unix-like environment(e.g., Linux, cygwin), you may uncompress the package with the following command: ! gzip -dc shamrock.tar.gz | tar xvf - ! 3. Copy the hello application to the TinyOS application directory. The hello application is in SHAMROCKDIR/src/app/hello. ! For example, the following command copies the application in a Unix-like environment. ! cp -R SHAMROCKDIR/src/app/hello $TOSDIR/../apps ! Remember to substitute the correct path for SHAMROCKDIR in the above command. + 4. Copy the VDB source files (vdbavr.*) into the hello application's directory. The VDB source files are in SHAMROCKDIR/src/util/vdb. Example: + + cp SHAMROCKDIR/src/util/vdb/vdbavr.* $TOSDIR/../apps/hello + + 5. Go to the hello appliction's directory, open the file HelloM.nc, and include the file "vdbavr.inc" in the "implementation" block of the NesC program. + + For example, add the following line at the beginning of the "implementation" block. + + #include "vdbavr.inc" + + 6. In the "Timer.fired()" event, add a call to vdbPrintln4() to print debug information via the UART. + + For example, add the following line in Timer.fired(), + + vdbPrintln4("hello world", lTick, 0, 0, 0); + + 7. Build the hello application. Example: + + make mica2 + + 8. Upload the hello application to the mote. + + For example, if using an MIB510 serial programming board, you may run the following command: + + make mica2 reinstall mib510 + + 9. Set up the java CLASSPATH to include SHAMROCK/src/util/vdb. Example: + + export CLASSPATH=$CLASSPATH:SHAMROCK/src/util/vdb + + 10. Run VDB terminal to display the debug output, specify the COM port if necessary (the default is COM1). + + For example, if you are using COM1, run the following command: + + java VDBTerm + + If you are using COM2, run the following command. + + java VDBTerm COM2 + + The "hello world" messages should be displayed on the terminal. |
|
From: Lin Gu <li...@us...> - 2005-04-20 19:43:10
|
Update of /cvsroot/vert/shamrock/src/util/vdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11162/src/util/vdb Modified Files: VDBTerm.java vdbavr.h vdbavr.inc Log Message: vdbavr updated Index: vdbavr.inc =================================================================== RCS file: /cvsroot/vert/shamrock/src/util/vdb/vdbavr.inc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** vdbavr.inc 20 Apr 2005 16:43:07 -0000 1.1.1.1 --- vdbavr.inc 20 Apr 2005 19:43:02 -0000 1.2 *************** *** 5,12 **** --- 5,16 ---- //#include <hw.h> //#include <stdio.h> + //#include "stdio.inc" + //#include <stdlib.h> #include "vdbavr.h" //#include "commontknl.h" //#include "bl_flash.h" + //extern int vsprintf(char *__s, const char *__fmt, va_list ap); + #define SYSCLK (14745600UL/2) *************** *** 136,149 **** outp(0x00, UCSR0C); return 1; ! } */ void usartPut(uint8_t c) { ! HW_uwait(6500); /* was 110 */ outp(c, UDR0); sbi(UCSR0A, TXC); } void usartPutChipHex(uint8_t cChip) { --- 140,160 ---- outp(0x00, UCSR0C); return 1; ! } // vdbPrintf */ + //#define PUT_WAIT 6500 /* was 110 */ + #define PUT_WAIT 1500 + void usartPut(uint8_t c) { ! HW_uwait(PUT_WAIT); outp(c, UDR0); sbi(UCSR0A, TXC); } + TOSH_INTERRUPT(SIG_UART0_TRANS) { + return; + // signal UART.putDone(); + } void usartPutChipHex(uint8_t cChip) { *************** *** 242,246 **** { uint8_t i; ! // char cBuf[100]; if (!(cFlag & 1)) --- 253,258 ---- { uint8_t i; ! ! //cli(); if (!(cFlag & 1)) *************** *** 250,255 **** } - // sprintf(cBuf, pstr, l1, l2, l3, l4); - if (pstr) { --- 262,265 ---- *************** *** 269,279 **** usartPutLong(l4); usartPut('\n'); - HW_uwait(100); ! /* ! outp(0x00, UCSR0A); ! outp(0x00, UCSR0B); ! outp(0x00, UCSR0C); ! */ return 1; } // vdbPrintln4 --- 279,285 ---- usartPutLong(l4); usartPut('\n'); HW_uwait(100); ! // sei(); ! return 1; } // vdbPrintln4 Index: vdbavr.h =================================================================== RCS file: /cvsroot/vert/shamrock/src/util/vdb/vdbavr.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** vdbavr.h 20 Apr 2005 16:43:07 -0000 1.1.1.1 --- vdbavr.h 20 Apr 2005 19:43:02 -0000 1.2 *************** *** 4,8 **** int initUSART() ; /////// __attribute__ ((section (".secroutine"))); ! // int vdbPrintf(char *pstrFormat, ...); void usartPutInt(uint16_t l) ; /////// __attribute__ ((section (".secroutine"))); void usartPutLong(uint32_t l) ; /////// __attribute__ ((section (".secroutine"))); --- 4,8 ---- int initUSART() ; /////// __attribute__ ((section (".secroutine"))); ! int vdbPrintf(char *pstrFormat, ...); void usartPutInt(uint16_t l) ; /////// __attribute__ ((section (".secroutine"))); void usartPutLong(uint32_t l) ; /////// __attribute__ ((section (".secroutine"))); |
|
From: Lin Gu <li...@us...> - 2005-04-20 18:53:51
|
Update of /cvsroot/vert/shamrock/src/app/mag/mag.stand-alone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16042/src/app/mag/mag.stand-alone Modified Files: Makefile Log Message: minor updates Index: Makefile =================================================================== RCS file: /cvsroot/vert/shamrock/src/app/mag/mag.stand-alone/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 19 Apr 2005 19:53:46 -0000 1.2 --- Makefile 20 Apr 2005 18:53:41 -0000 1.3 *************** *** 1,4 **** COMPONENT=TestMag ! PFLAGS := -DLIN_DEBUG -DPLATFORM_XSM -DDUMP_MAG_DATA -DPRINT_REPORTno $(PFLAGS) # SENSORBOARD=echelon #TINYOS_NP = TKER --- 1,4 ---- COMPONENT=TestMag ! PFLAGS := -DLIN_DEBUG -DPLATFORM_XSM -DDUMP_MAG_DATAno -DPRINT_REPORTno $(PFLAGS) # SENSORBOARD=echelon #TINYOS_NP = TKER |
|
From: Lin Gu <li...@us...> - 2005-04-19 19:54:45
|
Update of /cvsroot/vert/shamrock In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29296 Added Files: configenv Log Message: configenv added --- NEW FILE: configenv --- #! /bin/sh #echo This configuration program must be run at its residence directory. echo echo Note: SHAMROCKDIR must be set to the absolute path to where the shamrock echo source tree is. E.g., export SHAMROCKDIR=/usr/src/shamrock echo echo Note: $TOSDIR/\{platform, sensorboards\}/xsm are to be created. echo echo Press ctrl-C to cancel, other keys to proceed. read ln -nsf $SHAMROCKDIR/src/sys/sensor/xsm $TOSDIR/sensorboards ln -nsf $SHAMROCKDIR/src/sys/arch/xsm $TOSDIR/platform echo "Environment set-up has finished." |
|
From: Lin Gu <li...@us...> - 2005-04-19 19:53:57
|
Update of /cvsroot/vert/shamrock/src/app/mag/mag.stand-alone In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28550/src/app/mag/mag.stand-alone Modified Files: Makefile README Log Message: Updated Index: README =================================================================== RCS file: /cvsroot/vert/shamrock/src/app/mag/mag.stand-alone/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 18 Apr 2005 00:23:30 -0000 1.1.1.1 --- README 19 Apr 2005 19:53:46 -0000 1.2 *************** *** 2,6 **** Author/Contact: Lin Gu / li...@cs... ! Description: - Magnetic sensing --- 2,31 ---- Author/Contact: Lin Gu / li...@cs... ! This is a stand-alone application testing the magnetic sensing algorithm. ! ! ! Configuration: ! This application depends on some modules which do not exist in the TinyOS source tree. Hence, please configure it before compiling and running the application. ! ! 1. Set up the SHAMROCKDIR environment variable to the path where the shamrock directory is, e.g.: ! ! export SHAMROCKDIR=/usr/src/shamrock ! ! 2. Set up the TOSMAKE_PATH environment variable as follows: ! ! export TOSMAKE_PATH=$SHAMROCKDIR/src/sys/arch/xsm ! ! 3. Run "configenv" in the $SHAMROCKDIR directory, e.g., ! ! cd $SHAMROCK ! ./configenv ! ! Build ! ===== ! ! Make sure the SHAMROCKDIR and TOSMAKE_PATH is set correctly. ! Build the application as in TinyOS, e.g., ! ! make xsm ! Index: Makefile =================================================================== RCS file: /cvsroot/vert/shamrock/src/app/mag/mag.stand-alone/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 18 Apr 2005 00:23:30 -0000 1.1.1.1 --- Makefile 19 Apr 2005 19:53:46 -0000 1.2 *************** *** 3,5 **** # SENSORBOARD=echelon #TINYOS_NP = TKER ! include ../../Makerules --- 3,5 ---- # SENSORBOARD=echelon #TINYOS_NP = TKER ! include $(TOSDIR)/../apps/Makerules |
|
From: Lin Gu <li...@us...> - 2005-04-19 03:07:54
|
Update of /cvsroot/vert/shamrock/src/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27905 Added Files: Peek.nc Log Message: Peek interface --- NEW FILE: Peek.nc --- /* tab:4 Bug report to: Lin Gu <li...@cs...> */ /* A debugger provides simple methods for printing information to the user. */ interface Peek { command result_t printInt2(uint16_t nData); command result_t print4Int(uint16_t n1,uint16_t n2,uint16_t n3,uint16_t n4); command result_t lazyPrint4Int(uint16_t n1,uint16_t n2,uint16_t n3,uint16_t n4); command result_t lazyPrintInt16(uint16_t n1); command result_t lazyEscPrintInt16(uint16_t nData); command result_t bcastInt2(uint16_t nData); command result_t bcast2Long(uint32_t l1, uint32_t l2); command result_t bcastTrunc(uint16_t nData); command result_t lazyBcastInt2(uint16_t nData); command result_t lazyBcastChar(char nData); command result_t logLong(unsigned long lData); command result_t log(char cData); command result_t readLog(); command result_t logByte(char cData); command result_t readLogByte(); command result_t dumpLog(); command result_t closeLog(); event result_t hearChat(uint32_t l1, uint32_t l2); } /* tab:4 * * "Copyright (c) 2000-2002 The Regents of the University of Virginia. * 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 VIRGINIA 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 * VIRGINIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF VIRGINIA 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 VIRGINIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * */ /* * IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING. By * downloading, copying, installing or using the software you agree to * this license. If you do not agree to this license, do not download, * install, copy or use the software. * * Intel Open Source License * * Copyright (c) 2002 Intel Corporation * All rights reserved. * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * Neither the name of the Intel Corporation nor the names of its * contributors may be used to endorse or promote products derived from * this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE INTEL OR ITS * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * * @author Lin Gu (li...@cs...) */ |
|
From: Lin Gu <li...@us...> - 2005-04-15 01:53:43
|
Update of /cvsroot/vert/vert-1.3/tos/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28430 Modified Files: LedsC.nc TimerM.nc common.h sched.c Removed Files: AM.h Log Message: Synchrinizing a few modules with tinyos-1.x Index: LedsC.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/tos/system/LedsC.nc,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** LedsC.nc 29 Jan 2004 02:58:13 -0000 1.1.1.1 --- LedsC.nc 15 Apr 2005 01:53:24 -0000 1.2 *************** *** 60,63 **** --- 60,66 ---- ledsOn = 0; dbg(DBG_BOOT, "LEDS: initialized.\n"); + TOSH_MAKE_RED_LED_OUTPUT(); + TOSH_MAKE_YELLOW_LED_OUTPUT(); + TOSH_MAKE_GREEN_LED_OUTPUT(); TOSH_SET_RED_LED_PIN(); TOSH_SET_YELLOW_LED_PIN(); *************** *** 70,74 **** dbg(DBG_LED, "LEDS: Red on.\n"); atomic { ! TOSH_CLR_RED_LED_PIN(); ledsOn |= RED_BIT; } --- 73,77 ---- dbg(DBG_LED, "LEDS: Red on.\n"); atomic { ! TOSH_CLR_RED_LED_PIN(); ledsOn |= RED_BIT; } *************** *** 91,95 **** rval = call Leds.redOff(); else ! rval = call Leds.redOn(); } return rval; --- 94,99 ---- rval = call Leds.redOff(); else ! rval = call Leds.redOn(); ! ; } return rval; --- AM.h DELETED --- Index: TimerM.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/tos/system/TimerM.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TimerM.nc 18 Jul 2004 16:14:21 -0000 1.2 --- TimerM.nc 15 Apr 2005 01:53:24 -0000 1.3 *************** *** 32,36 **** /* * ! * Authors: Su Ping <sp...@in...> * Revision: $Id$ * This implementation assumes that DEFAULT_SCALE is 3. --- 32,40 ---- /* * ! * Authors: Joe Polastre <pol...@cs...> ! * Rob Szewczyk <sze...@cs...> ! * David Gay <dg...@in...> ! * David Moore ! * * Revision: $Id$ * This implementation assumes that DEFAULT_SCALE is 3. *************** *** 60,63 **** --- 64,68 ---- uint8_t queue_size; uint8_t queue[NUM_TIMERS]; + volatile uint16_t interval_outstanding; struct timer_s { *************** *** 95,99 **** uint8_t diff; if (id >= NUM_TIMERS) return FAIL; ! if (type>1) return FAIL; mTimerList[id].ticks = interval ; mTimerList[id].type = type; --- 100,112 ---- uint8_t diff; if (id >= NUM_TIMERS) return FAIL; ! if (type > TIMER_ONE_SHOT) return FAIL; ! // PAL: ! // The current implementation of TimerM cannot support ! // continuous timers that fire faster than every 3 ticks (3ms). ! // The problem is due to the possibility that the hardware clock ! // could increment while setting the compare value, which would lead ! // to 256 ms until it fires, instead of 1-2. ! if ((type == TIMER_REPEAT) && interval <= 2) return FAIL; ! mTimerList[id].ticks = interval ; mTimerList[id].type = type; *************** *** 122,130 **** } } ! atomic { ! mInterval = val; ! call Clock.setInterval(mInterval); ! setIntervalFlag = 0; ! } } else { --- 135,158 ---- } } ! ! /* DCM: If the interval is set to be less than the current ! * counter value, the timer will count an extra 256 ticks before ! * hitting the interrupt. Thus, we check for this condition ! * and avoid it. */ ! /* PAL: This piece of code sets a maximum interrupt rate ! * that TimerM will request for continuous timers. TimerM ! * will never request an interrupt less than 3ms from the ! * current time; it therefore returns FAIL on continuous ! * timers with an interval <= 2 (see Timer.start()). */ ! ! atomic { ! i = call Clock.readCounter() + 3; ! if (val < i) { ! val = i; ! } ! mInterval = val; ! call Clock.setInterval(mInterval); ! setIntervalFlag = 0; ! } } else { *************** *** 182,207 **** task void HandleFire() { uint8_t i; setIntervalFlag = 1; if (mState) { for (i=0;i<NUM_TIMERS;i++) { if (mState&(0x1L<<i)) { ! mTimerList[i].ticksLeft -= (mInterval+1) ; if (mTimerList[i].ticksLeft<=2) { ! if (mTimerList[i].type==TIMER_REPEAT) { ! mTimerList[i].ticksLeft += mTimerList[i].ticks; ! } else {// one shot timer ! mState &=~(0x1L<<i); } - enqueue(i); - post signalOneTimer(); } } } } ! adjustInterval(); } async event result_t Clock.fire() { ! post HandleFire(); return SUCCESS; } --- 210,271 ---- task void HandleFire() { uint8_t i; + uint16_t int_out; setIntervalFlag = 1; + /* DCM: read the number of ticks elapsed since the last firing + * was handled. */ + atomic { + int_out = interval_outstanding; + interval_outstanding = 0; + } if (mState) { for (i=0;i<NUM_TIMERS;i++) { if (mState&(0x1L<<i)) { ! mTimerList[i].ticksLeft -= int_out; if (mTimerList[i].ticksLeft<=2) { ! /* DCM: only update the timer structure if the ! * signalOneTimer() task was able to be posted. */ ! if (post signalOneTimer()) { ! if (mTimerList[i].type==TIMER_REPEAT) { ! mTimerList[i].ticksLeft += mTimerList[i].ticks; ! } else {// one shot timer ! mState &=~(0x1L<<i); ! } ! enqueue(i); ! } ! else { ! dbg(DBG_ERROR, "TimerM: Have to wait another timer interval.\n"); ! /* DCM: wait another interval in hopes that ! * the task queue will clear out. */ ! mTimerList[i].ticksLeft = mInterval; } } } } } ! /* DCM: don't bother adjusting the interval if another interrupt ! * is hot on our tail. */ ! atomic int_out = interval_outstanding; ! if (int_out == 0) ! adjustInterval(); ! } + // #include "common.h" async event result_t Clock.fire() { ! /* static int n; ! ! showLeds(n++); ! */ ! atomic { ! /* DCM: Once we've posted HandleFire(), don't post it again until ! * the original one is handled. This prevents the task queue ! * from getting flooded when mInterval is small. */ ! if (interval_outstanding == 0) ! post HandleFire(); ! else ! dbg(DBG_ERROR, "Don't post handle fire, we're not ready\n"); ! /* DCM: Keep track of the interval since the last interrupt */ ! interval_outstanding += call Clock.getInterval() + 1; ! } return SUCCESS; } Index: sched.c =================================================================== RCS file: /cvsroot/vert/vert-1.3/tos/system/sched.c,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sched.c 25 Jul 2004 16:59:29 -0000 1.3 --- sched.c 15 Apr 2005 01:53:24 -0000 1.4 *************** *** 98,101 **** --- 98,106 ---- */ + /////// --lin bool TOS_post(void (*tp) ()) __attribute__((spontaneous)) { + #ifdef TKNL + bool TOS_post(void (*tp) ()) __attribute__ ((section (".secsched"))); + #endif + bool TOS_post(void (*tp) ()) __attribute__((spontaneous)) { __nesc_atomic_t fInterruptFlags; Index: common.h =================================================================== RCS file: /cvsroot/vert/vert-1.3/tos/system/common.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** common.h 4 Dec 2004 00:54:05 -0000 1.3 --- common.h 15 Apr 2005 01:53:24 -0000 1.4 *************** *** 11,14 **** --- 11,20 ---- #include "stdlib.h" + #ifdef TKERNEL + #define TOSH HW + #endif + + // #define NULL 0 + // Macros #define min(x, y) ((x)>(y) ? (y) : (x)) |
|
From: Lin Gu <li...@us...> - 2004-12-27 22:44:43
|
Update of /cvsroot/vert/vert-1.3/apps/TestTK/LedSig In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18678 Modified Files: README Log Message: add ledsig Index: README =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/TestTK/LedSig/README,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** README 27 Dec 2004 22:43:13 -0000 1.1.1.1 --- README 27 Dec 2004 22:44:34 -0000 1.2 *************** *** 1,10 **** README for Blink ! Author/Contact: tin...@mi... Description: ! Blink is a basic application that starts a 1Hz timer and toggles the red ! LED every time it fires. It is a very simple program that is little ! more than a demonstration of TinyOS programming. Tools: --- 1,8 ---- README for Blink ! Author/Contact: li...@cs... Description: ! LedSig is a test app Tools: |
|
From: Lin Gu <li...@us...> - 2004-12-27 22:25:20
|
Update of /cvsroot/vert/vert-1.3/apps/TestTK/TKImg/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14856/apps/TestTK/TKImg/include Modified Files: GoldenImageWriter_mica2.h Log Message: LedSig is a test app. Index: GoldenImageWriter_mica2.h =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/TestTK/TKImg/include/GoldenImageWriter_mica2.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** GoldenImageWriter_mica2.h 24 Nov 2004 03:31:15 -0000 1.1.1.1 --- GoldenImageWriter_mica2.h 27 Dec 2004 22:25:07 -0000 1.2 *************** *** 42,46 **** uint32_t endAddrs[GIW_NUM_SECTIONS] = { 0x6000 }; ! #define GIW_GET_BYTE(x) (__elpm_inline(x)) #endif --- 42,47 ---- uint32_t endAddrs[GIW_NUM_SECTIONS] = { 0x6000 }; ! //#define GIW_GET_BYTE(x) (__elpm_inline(x)) ! #define GIW_GET_BYTE(x) (__ELPM(x)) #endif |
|
From: Lin Gu <li...@us...> - 2004-12-27 22:25:18
|
Update of /cvsroot/vert/vert-1.3/tos/lib/t-kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14856/tos/lib/t-kernel Modified Files: NetProg.h Log Message: LedSig is a test app. Index: NetProg.h =================================================================== RCS file: /cvsroot/vert/vert-1.3/tos/lib/t-kernel/NetProg.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** NetProg.h 15 Dec 2004 23:28:36 -0000 1.1.1.1 --- NetProg.h 27 Dec 2004 22:25:08 -0000 1.2 *************** *** 36,40 **** #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_MICAZ) ! #include <avr/bootloader.h> #include <avr/bl_flash.h> --- 36,40 ---- #if defined(PLATFORM_MICA2) || defined(PLATFORM_MICA2DOT) || defined(PLATFORM_MICAZ) ! #include <avr/bootAVR.h> #include <avr/bl_flash.h> |
|
From: Lin Gu <li...@us...> - 2004-12-27 22:25:18
|
Update of /cvsroot/vert/vert-1.3/tools/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14856/tools/make Modified Files: mica2.target Log Message: LedSig is a test app. Index: mica2.target =================================================================== RCS file: /cvsroot/vert/vert-1.3/tools/make/mica2.target,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** mica2.target 4 Dec 2004 00:54:04 -0000 1.3 --- mica2.target 27 Dec 2004 22:25:07 -0000 1.4 *************** *** 16,21 **** ifeq ($(TINYOS_NP),TKER) PFLAGS += -I%T/lib/t-kernel ! PFLAGS += -I%T/lib/t-kernel/t-monitor/include ! BOOTLOADER ?= $(TOSDIR)/lib/t-kernel/t-monitor/bl_mica2.srec AVR_FUSE_H ?= 0xd8 endif --- 16,21 ---- ifeq ($(TINYOS_NP),TKER) PFLAGS += -I%T/lib/t-kernel ! PFLAGS += -I%T/lib/t-kernel/t-nucleus/include ! BOOTLOADER ?= $(TOSDIR)/lib/t-kernel/t-nucleus/bootAVRmica2.srec AVR_FUSE_H ?= 0xd8 endif |
|
From: Lin Gu <li...@us...> - 2004-12-27 22:25:18
|
Update of /cvsroot/vert/vert-1.3/tos/lib/t-kernel/t-monitor/include/avr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14856/tos/lib/t-kernel/t-monitor/include/avr Added Files: bootAVR.h Removed Files: bootloader.h Log Message: LedSig is a test app. --- NEW FILE: bootAVR.h --- // $Id: bootAVR.h,v 1.1 2004/12/27 22:25:08 lingu Exp $ /* tab:4 * * * "Copyright (c) 2000-2004 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." * */ /** * bootloader.h - For avr platform. * * @author Jonathan Hui <jw...@cs...> * @since 0.1 */ #ifndef __AVR_BOOTLOADER_H__ #define __AVR_BOOTLOADER_H__ #include <inttypes.h> typedef uint8_t (*programBufPtr_t)(void*, uint32_t, uint16_t); typedef uint8_t (*programImgPtr_t)(uint32_t); #define BL_EXTERNAL_PAGE_SIZE ((uint32_t)256) #define BL_GOLDEN_IMG_ADDR ((uint32_t)0) #define BL_GESTURE_MAX_COUNT 5 #define IS_WDT_RESET() \ (bit_is_set(MCUCSR, WDRF) && (!IS_NETPROG_RESET()) && (!IS_PROG_FAIL_RESET())) #define IS_POWER_ON_RESET() \ bit_is_set(MCUCSR, PORF) #define IS_BROWN_OUT_RESET() \ bit_is_set(MCUCSR, BORF) #define IS_EXTERNAL_RESET() \ (bit_is_set(MCUCSR, EXTRF) && (!IS_POWER_ON_RESET()) && (!IS_NETPROG_RESET())) #define IS_NETPROG_RESET() \ (eeprom_read_byte((uint8_t*)BL_FLAGS_ADDR) & BL_EXPLICIT_REBOOT) #define IS_PROG_FAIL_RESET() \ (eeprom_read_byte((uint8_t*)BL_FLAGS_ADDR) & BL_PROGRAM_FAIL_FLAG) #define CLEAR_WDT_RESET_FLAG() \ cbi(MCUCSR,WDRF); #define CLEAR_POWER_ON_RESET_FLAG() \ cbi(MCUCSR,PORF); #define CLEAR_BROWN_OUT_RESET_FLAG() \ cbi(MCUCSR,BORF); #define CLEAR_EXTERNAL_RESET_FLAG() \ cbi(MCUCSR,EXTRF); #define CLEAR_NETPROG_RESET_FLAG() \ { \ uint8_t tmp = eeprom_read_byte((uint8_t*)BL_FLAGS_ADDR); \ tmp &= ~BL_EXPLICIT_REBOOT; \ eeprom_write_byte((uint8_t*)BL_FLAGS_ADDR, tmp); \ while(!eeprom_is_ready()); \ } #define CLEAR_PROG_FAIL_RESET_FLAG() \ { \ uint8_t tmp = eeprom_read_byte((uint8_t*)BL_FLAGS_ADDR); \ tmp &= ~BL_PROGRAM_FAIL_FLAG; \ eeprom_write_byte((uint8_t*)BL_FLAGS_ADDR, tmp); \ while(!eeprom_is_ready()); \ } #define BL_RESET_LOG_ENTRY_SIZE 3 // in bits #define BL_RESET_LOG_ENTRY_MASK 7 enum { BL_NULL_ENTRY_RESET = 0, BL_WDT_RESET = 1, BL_EXTERNAL_RESET = 2, BL_POWER_ON_RESET = 3, BL_BROWN_OUT_RESET = 4, BL_PROGRAM_FAIL = 5, BL_NETPROG_RESET = 6, }; enum { BL_GOLDEN_IMG_LOADED = 1, BL_EXPLICIT_REBOOT = 2, BL_PROGRAM_FAIL_FLAG = 4, }; // reset counters #define BL_WDT_RESET_COUNTER 0xFE0 // 2 bytes #define BL_EXTERNAL_RESET_COUNTER 0xFE2 // 2 bytes #define BL_POWER_ON_RESET_COUNTER 0xFE4 // 2 bytes #define BL_BROWN_OUT_RESET_COUNTER 0xFE6 // 2 bytes #define BL_PROGRAM_FAIL_COUNTER 0xFE8 // 2 bytes #define BL_NETPROG_RESET_COUNTER 0xFEA // 2 bytes #define BL_RESET_HISTORY 0xFEC // 2 bytes // bootloader state #define BL_LOAD_IMG_ADDR 0xFF0 // 1 byte #define BL_GESTURE_COUNT_ADDR 0xFF1 // 1 byte #define BL_NEW_IMG_START_PAGE_ADDR 0xFF2 // 2 bytes #define BL_CUR_IMG_START_PAGE_ADDR 0xFF4 // 2 bytes #define BL_PROGRAM_BUF_ADDR 0xFF6 // 4 bytes #define BL_FLAGS_ADDR 0xFFE // 1 byte #endif --- bootloader.h DELETED --- |
|
From: Lin Gu <li...@us...> - 2004-12-27 22:25:17
|
Update of /cvsroot/vert/vert-1.3/apps/vdb In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14856/apps/vdb Added Files: VDBTerm.java Log Message: LedSig is a test app. --- NEW FILE: VDBTerm.java --- // $Id: VDBTerm.java,v 1.1 2004/12/27 22:25:07 lingu Exp $ /* tab:4 * "Copyright (c) 2000-2003 The Regents of the University of Virginia. * 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 VIRGINIA 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 * VIRGINIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * THE UNIVERSITY OF VIRGINIA 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 VIRGINIA HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS." * * Copyright (c) 2002-2003 Intel Corporation * All rights reserved. * * This file is distributed under the terms in the attached INTEL-LICENSE * file. If you do not find these files, copies can be found by writing to * Intel Research Berkeley, 2150 Shattuck Avenue, Suite 1300, Berkeley, CA, * 94704. Attention: Intel License Inquiry. */ /* Authors: Lin Gu * Last Modified: 12/24/04 * */ /** * @author Lin Gu */ import java.util.*; import java.io.*; import javax.comm.*; import net.tinyos.util.*; import net.tinyos.message.*; public class VDBTerm { private static String CLASS_NAME = "VDBTerm"; private static final int MAX_MSG_SIZE = 36; private static final int PORT_SPEED_MICA2 = 57600; // private static final int PORT_SPEED_MICA2 = 115200; private static final int PORT_SPEED_MICA2DOT = 19200; private static final int PORT_SPEED_MICA = 19200; private static final int PORT_SPEED_RENE = 19200; private static final int LENGTH_OFFSET = 4; private int packetLength; private int portSpeed; private CommPortIdentifier portId; private SerialPort port; private String portName; private InputStream in; private OutputStream out; public VDBTerm(String portName, int portSpeed) { this.portName = portName; this.portSpeed = portSpeed; } public void open() throws NoSuchPortException, PortInUseException, IOException, UnsupportedCommOperationException { System.out.println("Open port " + portName); portId = CommPortIdentifier.getPortIdentifier(portName); port = (SerialPort)portId.open(CLASS_NAME, 0); in = port.getInputStream(); out = port.getOutputStream(); port.setFlowControlMode(SerialPort.FLOWCONTROL_NONE); port.disableReceiveFraming(); port.setSerialPortParams(portSpeed, SerialPort.DATABITS_8, SerialPort.STOPBITS_1, SerialPort.PARITY_NONE); printPortStatus(); System.out.println(); } private void printPortStatus() { System.out.println(" VDBTerm: "); System.out.println(" baud rate: " + port.getBaudRate()); System.out.println(" data bits: " + port.getDataBits()); System.out.println(" stop bits: " + port.getStopBits()); System.out.println(" parity: " + port.getParity()); } private static void printAllPorts() { Enumeration ports = CommPortIdentifier.getPortIdentifiers(); if (ports == null) { System.out.println("No comm ports found!"); return; } // print out all ports System.out.println("printing all ports..."); while (ports.hasMoreElements()) { System.out.println(" " + ((CommPortIdentifier)ports.nextElement()).getName()); } } public synchronized void printoutByte(int a) { if (a == 0x7e) { System.out.println(""); } else { Dump.printByte(System.out, a); } return; } public void printChar(int nChar) { System.out.print((char)nChar); } public void read() throws IOException { int i; int count = 0; byte[] packet = new byte[MAX_MSG_SIZE]; while ((i = in.read()) != -1) { if (i == 0x7e) { System.out.println(); } // System.out.print(i); // Dump.printByte(System.out, i); printChar(i); // printoutByte(i); } } private static void printUsage() { System.err.println("usage: java net.tinyos.tools.VDBTerm [options] <port>"); System.err.println("options are:"); System.err.println(" -h, --help: usage help"); System.err.println(" -p: print available ports"); System.err.println(" -mica2: Mica2 ("+PORT_SPEED_MICA2+" bps) [default]"); System.err.println(" -mica2dot: Mica2Dot ("+PORT_SPEED_MICA2DOT+" bps)"); System.err.println(" -mica: Mica ("+PORT_SPEED_MICA+" bps)"); System.err.println(" -rene: Rene ("+PORT_SPEED_RENE+" bps)"); System.exit(-1); } public static void main(String args[]) { int speed = PORT_SPEED_MICA2; if ((args.length < 1) || (args.length > 3)) { printUsage(); } for (int i = 0; i < args.length; i++) { if (args[i].equals("-h") || args[i].equals("--help")) { printUsage(); } if (args[i].equals("-p")) { printAllPorts(); } if (args[i].equals("-mica2")) { speed = PORT_SPEED_MICA2; } if (args[i].equals("-mica2dot")) { speed = PORT_SPEED_MICA2DOT; } if (args[i].equals("-mica")) { speed = PORT_SPEED_MICA; } if (args[i].equals("-rene")) { speed = PORT_SPEED_RENE; } } if (args[args.length - 1].charAt(0) == '-') { return; // No port specified } VDBTerm reader = new VDBTerm(args[args.length - 1], speed); try { reader.open(); } catch (Exception e) { e.printStackTrace(); } try { reader.read(); } catch (Exception e) { e.printStackTrace(); } } } |
|
From: Lin Gu <li...@us...> - 2004-12-27 22:25:17
|
Update of /cvsroot/vert/vert-1.3/apps/TestDeluge/GoldenImage/build/mica2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14856/apps/TestDeluge/GoldenImage/build/mica2 Modified Files: ident_flags.txt Log Message: LedSig is a test app. Index: ident_flags.txt =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/TestDeluge/GoldenImage/build/mica2/ident_flags.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ident_flags.txt 15 Dec 2004 22:15:16 -0000 1.3 --- ident_flags.txt 27 Dec 2004 22:25:07 -0000 1.4 *************** *** 1 **** ! -DIDENT_PROGRAM_NAME="GoldenIma" -DIDENT_PROGRAM_NAME_BYTES="71,111,108,100,101,110,73,109,97,0" -DIDENT_USER_HASH=0x959c460dL -DIDENT_UNIX_TIME=0x41b7c2bcL --- 1 ---- ! -DIDENT_PROGRAM_NAME="GoldenIma" -DIDENT_PROGRAM_NAME_BYTES="71,111,108,100,101,110,73,109,97,0" -DIDENT_USER_HASH=0xaa31732bL -DIDENT_UNIX_TIME=0x41cf2633L |
|
From: Lin Gu <li...@us...> - 2004-12-15 22:15:30
|
Update of /cvsroot/vert/vert-1.3/tos/platform/mica2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16562/tos/platform/mica2 Modified Files: CC1000RadioIntM.nc Log Message: commit after returning from Avon Park, FL. Index: CC1000RadioIntM.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/tos/platform/mica2/CC1000RadioIntM.nc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** CC1000RadioIntM.nc 4 Aug 2004 17:40:45 -0000 1.6 --- CC1000RadioIntM.nc 15 Dec 2004 22:15:17 -0000 1.7 *************** *** 846,850 **** // Time Sync: substract one to start counting from zero signal RadioReceiveCoordinator.byte(rxbufptr, (uint8_t)RxByteCnt-1); ! if (RxByteCnt < rxlength) { usRunningCRC = crcByte(usRunningCRC,Byte); --- 846,869 ---- // Time Sync: substract one to start counting from zero signal RadioReceiveCoordinator.byte(rxbufptr, (uint8_t)RxByteCnt-1); ! #define USE_LED_RADIO ! #ifdef USE_LED_RADIO ! { ! static int aa, ss; ! if (!(aa&0xf)) ! { ! if (ss) ! { ! TOSH_CLR_RED_LED_PIN(); ! } ! else ! { ! TOSH_SET_RED_LED_PIN(); ! } // else ! ! ss = 1 - ss; ! } // if ! } ! #endif ! if (RxByteCnt < rxlength) { usRunningCRC = crcByte(usRunningCRC,Byte); |
|
From: Lin Gu <li...@us...> - 2004-12-15 22:15:30
|
Update of /cvsroot/vert/vert-1.3/tos/system In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16562/tos/system Modified Files: AMStandard.nc Log Message: commit after returning from Avon Park, FL. Index: AMStandard.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/tos/system/AMStandard.nc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AMStandard.nc 25 Jul 2004 16:59:29 -0000 1.6 --- AMStandard.nc 15 Dec 2004 22:15:17 -0000 1.7 *************** *** 252,259 **** dbg(DBG_AM, "AM_address = %hx, %hhx; counter:%i\n", packet->addr, packet->type, (int)counter); ! if (// packet->crc == 1 && // Uncomment this line to check crcs ! packet->group == TOS_AM_GROUP && (packet->addr == TOS_BCAST_ADDR || ! packet->addr == addr)) { --- 252,259 ---- dbg(DBG_AM, "AM_address = %hx, %hhx; counter:%i\n", packet->addr, packet->type, (int)counter); ! if (1// packet->crc == 1 && // Uncomment this line to check crcs ! /*packet->group == TOS_AM_GROUP && (packet->addr == TOS_BCAST_ADDR || ! packet->addr == addr)*/) { |
|
From: Lin Gu <li...@us...> - 2004-12-15 22:15:29
|
Update of /cvsroot/vert/vert-1.3/apps/TestDeluge/GoldenImage/build/mica2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16562/apps/TestDeluge/GoldenImage/build/mica2 Modified Files: ident_flags.txt Log Message: commit after returning from Avon Park, FL. Index: ident_flags.txt =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/TestDeluge/GoldenImage/build/mica2/ident_flags.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** ident_flags.txt 24 Nov 2004 03:30:25 -0000 1.2 --- ident_flags.txt 15 Dec 2004 22:15:16 -0000 1.3 *************** *** 1 **** ! -DIDENT_PROGRAM_NAME="GoldenIma" -DIDENT_PROGRAM_NAME_BYTES="71,111,108,100,101,110,73,109,97,0" -DIDENT_USER_HASH=0x1e576a61L -DIDENT_UNIX_TIME=0x41a3fe63L --- 1 ---- ! -DIDENT_PROGRAM_NAME="GoldenIma" -DIDENT_PROGRAM_NAME_BYTES="71,111,108,100,101,110,73,109,97,0" -DIDENT_USER_HASH=0x959c460dL -DIDENT_UNIX_TIME=0x41b7c2bcL |
|
From: Lin Gu <li...@us...> - 2004-12-15 22:15:26
|
Update of /cvsroot/vert/vert-1.3/apps/xsm3.mag.sownclassification In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16562/apps/xsm3.mag.sownclassification Modified Files: MagClassifyM.nc Makefile TestMag.nc TestMagM.nc Log Message: commit after returning from Avon Park, FL. Index: MagClassifyM.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/xsm3.mag.sownclassification/MagClassifyM.nc,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** MagClassifyM.nc 4 Dec 2004 00:54:03 -0000 1.7 --- MagClassifyM.nc 15 Dec 2004 22:15:17 -0000 1.8 *************** *** 247,250 **** --- 247,251 ---- #include "common.h" + uint8_t cNumStarted, cSleeping; TargetConfidence gtcTarget; uint8_t state, nPotX, nPotY;; *************** *** 801,805 **** atomic { state = MAG_GENESIS; ! call MagControl.init(); --- 802,806 ---- atomic { state = MAG_GENESIS; ! cNumStarted = cSleeping = 0; call MagControl.init(); *************** *** 921,925 **** if (l_state == MAGSENSE) { ! atomic state = MAG_WAKEUP; } else --- 922,929 ---- if (l_state == MAGSENSE) { ! atomic { ! state = MAG_WAKEUP; ! cSleeping = 0; ! } // atomic } else *************** *** 950,953 **** --- 954,969 ---- return FAIL; } + + if (cNumStarted > 0) + { + if (!cSleeping) + { + return SUCCESS; + } // if + } // if + else + { + cNumStarted++; + } // else if (l_state == MAG_GENESIS) *************** *** 990,993 **** --- 1006,1010 ---- void doStopSensor() { + cSleeping = 1; call Timer.stop(); call MagControl.stop(); Index: TestMag.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/xsm3.mag.sownclassification/TestMag.nc,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** TestMag.nc 4 Dec 2004 00:54:04 -0000 1.2 --- TestMag.nc 15 Dec 2004 22:15:17 -0000 1.3 *************** *** 35,38 **** --- 35,39 ---- TestMagM.ClassifiedSensing -> MagClassify; TestMagM.Timer -> TimerC.Timer[unique("Timer")]; + TestMagM.Timer1 -> TimerC.Timer[unique("Timer")]; TestMagM.CollaborativeSensing -> MagClassify; } Index: Makefile =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/xsm3.mag.sownclassification/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Makefile 4 Dec 2004 00:54:04 -0000 1.6 --- Makefile 15 Dec 2004 22:15:17 -0000 1.7 *************** *** 1,4 **** COMPONENT=TestMag ! PFLAGS := -DSHOW_PHASEno -DLIN_DEBUGno -DMAG_INDICATE_REPORTno -DPRINT_REPORT -DMAG_USE_SOUNDERno -DPLATFORM_XSM_X -DPLATFORM_XSM -DDUMP_MAG_DATAno -DCLASSIFY_VEHICLE $(PFLAGS) # SENSORBOARD=echelon #TINYOS_NP = TKER --- 1,4 ---- COMPONENT=TestMag ! PFLAGS := -DSHOW_PHASEno -DLIN_DEBUG -DMAG_INDICATE_REPORTno -DPRINT_REPORT -DMAG_USE_SOUNDERno -DPLATFORM_XSM_X -DPLATFORM_XSM -DDUMP_MAG_DATAno -DCLASSIFY_VEHICLE $(PFLAGS) # SENSORBOARD=echelon #TINYOS_NP = TKER Index: TestMagM.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/xsm3.mag.sownclassification/TestMagM.nc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TestMagM.nc 4 Dec 2004 00:54:04 -0000 1.5 --- TestMagM.nc 15 Dec 2004 22:15:17 -0000 1.6 *************** *** 34,37 **** --- 34,38 ---- interface ClassifiedSensing; interface Timer; + interface Timer as Timer1; #ifdef USE_PEEK interface StdControl as PeekControl; *************** *** 52,55 **** --- 53,57 ---- int nFA; long lTick; + int second; command result_t StdControl.init() { *************** *** 110,113 **** --- 112,117 ---- if (confidence[1] >= 30) { + call Timer1.start(TIMER_ONE_SHOT, 50); + #define DETECT_FALSE_ALARMno #ifdef DETECT_FALSE_ALARM *************** *** 136,139 **** --- 140,151 ---- return SUCCESS; } + event result_t Timer1.fired() + { + if (second) return SUCCESS; + second = 1; + call ClassifiedSensing.enableSensor(); + call MagClassify.start(); + return SUCCESS; + } event result_t Timer.fired() *************** *** 171,175 **** #ifdef TEST_WAKE_UP ! if (lTick == 22) { call MagClassify.stop(); --- 183,187 ---- #ifdef TEST_WAKE_UP ! if (lTick == 33) { call MagClassify.stop(); *************** *** 178,182 **** } ! if (lTick == 25) { #ifdef USE_PEEK --- 190,194 ---- } ! if (lTick == 34) { #ifdef USE_PEEK *************** *** 189,193 **** ! if (lTick == 35) { #ifdef USE_PEEK --- 201,205 ---- ! if (lTick == 38) { #ifdef USE_PEEK *************** *** 234,241 **** } ! if (lTick == 90) { #ifdef USE_PEEK ! call Peek.print4Int(0xa,0xa,3,3); #endif call MagClassify.start(); --- 246,253 ---- } ! if (lTick == 105) { #ifdef USE_PEEK ! // call Peek.print4Int(0xa,0xa,3,3); #endif call MagClassify.start(); |
|
From: Lin Gu <li...@us...> - 2004-12-04 00:54:58
|
Update of /cvsroot/vert/vert-1.3/apps/TestTK/TKImg In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14056/apps/TestTK/TKImg Modified Files: Makefile Log Message: shorter mag wake-up latency Index: Makefile =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/TestTK/TKImg/Makefile,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Makefile 24 Nov 2004 03:31:15 -0000 1.1.1.1 --- Makefile 4 Dec 2004 00:54:03 -0000 1.2 *************** *** 2,4 **** PFLAGS += -I./include -DDELUGE_GOLDEN_IMAGE -DDELUGE_LEDS CFLAGS += -DTOSH_MAX_TASKS_LOG2=7 ! include ../../Makerules \ No newline at end of file --- 2,5 ---- PFLAGS += -I./include -DDELUGE_GOLDEN_IMAGE -DDELUGE_LEDS CFLAGS += -DTOSH_MAX_TASKS_LOG2=7 ! TINYOS_NP = TKER ! include ../../Makerules |
|
From: Lin Gu <li...@us...> - 2004-12-04 00:54:49
|
Update of /cvsroot/vert/vert-1.3/apps/Blink In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14056/apps/Blink Modified Files: BlinkM.nc Log Message: shorter mag wake-up latency Index: BlinkM.nc =================================================================== RCS file: /cvsroot/vert/vert-1.3/apps/Blink/BlinkM.nc,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** BlinkM.nc 23 Nov 2004 03:27:20 -0000 1.3 --- BlinkM.nc 4 Dec 2004 00:54:02 -0000 1.4 *************** *** 51,55 **** **/ command result_t StdControl.init() { ! //////// call Leds.init(); return SUCCESS; } --- 51,55 ---- **/ command result_t StdControl.init() { ! call Leds.init(); return SUCCESS; } *************** *** 63,67 **** command result_t StdControl.start() { // Start a repeating timer that fires every 1000ms ! //////// return call Timer.start(TIMER_REPEAT, 1000); return 1; } --- 63,67 ---- command result_t StdControl.start() { // Start a repeating timer that fires every 1000ms ! return call Timer.start(TIMER_REPEAT, 1000); return 1; } *************** *** 85,89 **** event result_t Timer.fired() { ! /////// call Leds.redToggle(); /////// TOSH_CLR_YELLOW_LED_PIN(); return SUCCESS; --- 85,89 ---- event result_t Timer.fired() { ! call Leds.redToggle(); /////// TOSH_CLR_YELLOW_LED_PIN(); return SUCCESS; |