[Tinyos-commits] CVS: tinyos-1.x/tos/lib/Deluge/TOSBoot/telosb
ExecC.nc, NONE, 1.1 PluginC.nc, NONE, 1.1 PowerOffM.nc, NONE,
1.1 hardware.h, NONE, 1.1
Jonathan Hui
jwhui at users.sourceforge.net
Fri Jul 22 10:40:13 PDT 2005
- Previous message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Deluge/TOSBoot/telos
ExecC.nc, NONE, 1.1 PluginC.nc, NONE, 1.1 hardware.h, NONE, 1.1
- Next message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Deluge BitVecUtils.h, 1.4,
1.5 BitVecUtils.nc, 1.4, 1.5 BitVecUtilsC.nc, 1.5,
1.6 Deluge.h, 1.23, 1.24 DelugeC.nc, 1.22,
1.23 DelugeDataRead.nc, NONE, 1.1 DelugeDataWrite.nc, NONE,
1.1 DelugeM.nc, 1.51, 1.52 DelugeMetadata.h, 1.11,
1.12 DelugeMetadata.nc, 1.10, 1.11 DelugeMetadataC.nc, 1.9,
1.10 DelugeMetadataM.nc, 1.26, 1.27 DelugeMetadataStore.nc,
NONE, 1.1 DelugeMsgs.h, 1.14, 1.15 DelugePageTransfer.nc, 1.5,
1.6 DelugePageTransferC.nc, 1.10, 1.11 DelugePageTransferM.nc,
1.29, 1.30 DelugeStats.nc, NONE, 1.1 DelugeStorage.nc, NONE,
1.1 DelugeStorageC.nc, NONE, 1.1 DelugeStorageM.nc, NONE,
1.1 NetProg.h, 1.14, 1.15 NetProg.nc, 1.10, 1.11 NetProgC.nc,
1.10, 1.11 NetProgM.nc, 1.30, 1.31 NetProgMsgs.h, NONE,
1.1 SharedMsgBuf.nc, 1.4, 1.5 SharedMsgBufM.nc, 1.5,
1.6 TOSBoot.h, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-1.x/tos/lib/Deluge/TOSBoot/telosb
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22969/TOSBoot/telosb
Added Files:
ExecC.nc PluginC.nc PowerOffM.nc hardware.h
Log Message:
- Initial import of Deluge 2.0.
--- NEW FILE: ExecC.nc ---
// $Id: ExecC.nc,v 1.1 2005/07/22 17:40:11 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 ExecC {
provides {
interface Exec;
}
}
implementation {
command void Exec.exec() {
__asm__ __volatile__ ("br #0x4800\n\t" ::);
}
}
--- NEW FILE: PluginC.nc ---
// $Id: PluginC.nc,v 1.1 2005/07/22 17:40:11 jwhui Exp $
/* tab:2
*
*
* "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."
*
*/
/**
* @author Jonathan Hui <jwhui at cs.berkeley.edu>
*/
configuration PluginC {
provides {
interface StdControl;
}
}
implementation {
components ExtFlashC, LedsC, PowerOffM;
StdControl = PowerOffM;
PowerOffM.Leds -> LedsC;
PowerOffM.SubControl -> ExtFlashC;
}
--- NEW FILE: PowerOffM.nc ---
// $Id: PowerOffM.nc,v 1.1 2005/07/22 17:40:11 jwhui Exp $
/* tab:2
*
*
* "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."
*
*/
/**
* @author Jonathan Hui <jwhui at cs.berkeley.edu>
*/
module PowerOffM {
provides {
interface StdControl;
}
uses {
interface Leds;
interface StdControl as SubControl;
}
}
implementation {
void haltsystem() {
uint16_t _lpmreg;
TOSH_SET_PIN_DIRECTIONS();
call SubControl.stop();
call Leds.glow(0x7, 0x0);
_lpmreg = LPM4_bits;
_lpmreg |= SR_GIE;
__asm__ __volatile__( "bis %0, r2" : : "m" ((uint16_t)_lpmreg) );
}
command result_t StdControl.init() {
return SUCCESS;
}
command result_t StdControl.start() {
// wait a short period for things to stabilize
wait(0xffff);
TOSH_MAKE_USERINT_INPUT();
// if user button is pressed, power down
if (!TOSH_READ_USERINT_PIN())
haltsystem();
return SUCCESS;
}
command result_t StdControl.stop() {
return SUCCESS;
}
}
--- NEW FILE: hardware.h ---
// $Id: hardware.h,v 1.1 2005/07/22 17:40:11 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>
*/
#ifndef __HARDWARE_H__
#define __HARDWARE_H__
#include "msp430hardware.h"
void wait(uint16_t t) {
for ( ; t > 0; t-- );
}
// LEDs
TOSH_ASSIGN_PIN(RED_LED, 5, 4);
TOSH_ASSIGN_PIN(GREEN_LED, 5, 5);
TOSH_ASSIGN_PIN(YELLOW_LED, 5, 6);
// UART pins
TOSH_ASSIGN_PIN(SOMI0, 3, 2);
TOSH_ASSIGN_PIN(SIMO0, 3, 1);
TOSH_ASSIGN_PIN(UCLK0, 3, 3);
TOSH_ASSIGN_PIN(UTXD0, 3, 4);
TOSH_ASSIGN_PIN(URXD0, 3, 5);
// User Interupt Pin
TOSH_ASSIGN_PIN(USERINT, 2, 7);
// FLASH
TOSH_ASSIGN_PIN(FLASH_PWR, 4, 3);
TOSH_ASSIGN_PIN(FLASH_CS, 4, 4);
TOSH_ASSIGN_PIN(FLASH_HOLD, 4, 7);
void TOSH_SET_PIN_DIRECTIONS(void)
{
P1SEL = 0;
P2SEL = 0;
P3SEL = 0;
P4SEL = 0;
P5SEL = 0;
P6SEL = 0;
P1DIR = 0xe0;
P1OUT = 0x00;
P2DIR = 0x7b;
P2OUT = 0x10;
P3DIR = 0xf1;
P3OUT = 0x00;
P4DIR = 0xfd;
P4OUT = 0xdd;
P5DIR = 0xff;
P5OUT = 0xff;
P6DIR = 0xff;
P6OUT = 0x00;
P1IE = 0;
P2IE = 0;
}
#endif
- Previous message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Deluge/TOSBoot/telos
ExecC.nc, NONE, 1.1 PluginC.nc, NONE, 1.1 hardware.h, NONE, 1.1
- Next message: [Tinyos-commits] CVS: tinyos-1.x/tos/lib/Deluge BitVecUtils.h, 1.4,
1.5 BitVecUtils.nc, 1.4, 1.5 BitVecUtilsC.nc, 1.5,
1.6 Deluge.h, 1.23, 1.24 DelugeC.nc, 1.22,
1.23 DelugeDataRead.nc, NONE, 1.1 DelugeDataWrite.nc, NONE,
1.1 DelugeM.nc, 1.51, 1.52 DelugeMetadata.h, 1.11,
1.12 DelugeMetadata.nc, 1.10, 1.11 DelugeMetadataC.nc, 1.9,
1.10 DelugeMetadataM.nc, 1.26, 1.27 DelugeMetadataStore.nc,
NONE, 1.1 DelugeMsgs.h, 1.14, 1.15 DelugePageTransfer.nc, 1.5,
1.6 DelugePageTransferC.nc, 1.10, 1.11 DelugePageTransferM.nc,
1.29, 1.30 DelugeStats.nc, NONE, 1.1 DelugeStorage.nc, NONE,
1.1 DelugeStorageC.nc, NONE, 1.1 DelugeStorageM.nc, NONE,
1.1 NetProg.h, 1.14, 1.15 NetProg.nc, 1.10, 1.11 NetProgC.nc,
1.10, 1.11 NetProgM.nc, 1.30, 1.31 NetProgMsgs.h, NONE,
1.1 SharedMsgBuf.nc, 1.4, 1.5 SharedMsgBufM.nc, 1.5,
1.6 TOSBoot.h, NONE, 1.1
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-commits
mailing list