[Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/pins HplMsp430InterruptSig.nc, NONE, 1.1 HplMsp430InterruptSigP.nc, NONE, 1.1 HplMsp430InterruptC.nc, 1.2, 1.3 HplMsp430InterruptNMIC.nc, 1.2, 1.3 HplMsp430InterruptNMIP.nc, 1.3, 1.4 HplMsp430InterruptP.nc, 1.2, 1.3
Kevin Klues
klueska at users.sourceforge.net
Thu Apr 17 15:38:36 PDT 2008
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/dma HplMsp430DmaC.nc, 1.4, 1.5 HplMsp430DmaP.nc, 1.4, 1.5
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/usart HplMsp430Usart0C.nc, 1.4, 1.5 HplMsp430Usart0P.nc, 1.4, 1.5 HplMsp430Usart1C.nc, 1.4, 1.5 HplMsp430Usart1P.nc, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv5147/pins
Modified Files:
HplMsp430InterruptC.nc HplMsp430InterruptNMIC.nc
HplMsp430InterruptNMIP.nc HplMsp430InterruptP.nc
Added Files:
HplMsp430InterruptSig.nc HplMsp430InterruptSigP.nc
Log Message:
Update to centralize inside one module where all interrupt handlers are signaled from
--- NEW FILE: HplMsp430InterruptSig.nc ---
/// $Id: HplMsp430InterruptSig.nc,v 1.1 2008/04/17 22:38:34 klueska Exp $
/*
* Copyright (c) 2004-2005 Crossbow Technology, Inc.
* 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 (updated) modification history and the author appear in
* all copies of this source code.
*
* Permission is also granted to distribute this software under the
* standard BSD license as contained in the TinyOS distribution.
*
* 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 COPYRIGHT HOLDERS OR CONTRIBUTORS
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, LOSS OF USE, DATA,
* OR PROFITS) 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.
*/
/**
* Interface to an Msp430 external interrupt pin that exposes just the
* interrupt vector routine for easy linking to generic components (see
* Msp430InterruptSigP for the full interface).
*
* @author Martin Turon <mturon at xbow.com>
* @author Kevin Klues <klueska at cs.stanford.edu>
* @see Msp430InterruptSigP
*/
interface HplMsp430InterruptSig
{
/**
* Signalled when an interrupt occurs on a pin
*/
inline async event void fired();
}
--- NEW FILE: HplMsp430InterruptSigP.nc ---
/*
* Copyright (c) 2008 Stanford University.
* 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 Stanford University 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 STANFORD
* UNIVERSITY 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 Kevin Klues <klueska at cs.stanford.edu>
*/
module HplMsp430InterruptSigP
{
provides {
interface HplMsp430InterruptSig as SIGNAL_ADC_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_DACDMA_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_NMI_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_PORT1_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_PORT2_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_TIMERA0_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_TIMERA1_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_TIMERB0_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_TIMERB1_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_UART0RX_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_UART0TX_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_UART1RX_VECTOR;
interface HplMsp430InterruptSig as SIGNAL_UART1TX_VECTOR;
}
}
implementation {
#define MSP430_INTERRUPT_HANDLER(NAME) \
default async event void SIGNAL_##NAME.fired() {} \
TOSH_SIGNAL(NAME) { \
signal SIGNAL_##NAME.fired(); \
}
MSP430_INTERRUPT_HANDLER(ADC_VECTOR)
MSP430_INTERRUPT_HANDLER(DACDMA_VECTOR)
MSP430_INTERRUPT_HANDLER(NMI_VECTOR)
MSP430_INTERRUPT_HANDLER(PORT1_VECTOR)
MSP430_INTERRUPT_HANDLER(PORT2_VECTOR)
MSP430_INTERRUPT_HANDLER(TIMERA0_VECTOR)
MSP430_INTERRUPT_HANDLER(TIMERA1_VECTOR)
MSP430_INTERRUPT_HANDLER(TIMERB0_VECTOR)
MSP430_INTERRUPT_HANDLER(TIMERB1_VECTOR)
MSP430_INTERRUPT_HANDLER(UART0RX_VECTOR)
MSP430_INTERRUPT_HANDLER(UART0TX_VECTOR)
MSP430_INTERRUPT_HANDLER(UART1RX_VECTOR)
MSP430_INTERRUPT_HANDLER(UART1TX_VECTOR)
}
Index: HplMsp430InterruptC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/HplMsp430InterruptC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HplMsp430InterruptC.nc 12 Jul 2006 17:01:42 -0000 1.2
--- HplMsp430InterruptC.nc 17 Apr 2008 22:38:34 -0000 1.3
***************
*** 52,55 ****
--- 52,56 ----
{
components HplMsp430InterruptP as HplInterruptP;
+ components HplMsp430InterruptSigP;
#ifdef __msp430_have_port1
Port10 = HplInterruptP.Port10;
***************
*** 61,64 ****
--- 62,66 ----
Port16 = HplInterruptP.Port16;
Port17 = HplInterruptP.Port17;
+ HplInterruptP.SIGNAL_PORT1_VECTOR -> HplMsp430InterruptSigP.SIGNAL_PORT1_VECTOR;
#endif
#ifdef __msp430_have_port2
***************
*** 71,74 ****
--- 73,77 ----
Port26 = HplInterruptP.Port26;
Port27 = HplInterruptP.Port27;
+ HplInterruptP.SIGNAL_PORT2_VECTOR -> HplMsp430InterruptSigP.SIGNAL_PORT2_VECTOR;
#endif
}
Index: HplMsp430InterruptNMIC.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/HplMsp430InterruptNMIC.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HplMsp430InterruptNMIC.nc 12 Jul 2006 17:01:42 -0000 1.2
--- HplMsp430InterruptNMIC.nc 17 Apr 2008 22:38:34 -0000 1.3
***************
*** 39,41 ****
--- 39,44 ----
OF = HplInterruptP.OF;
ACCV = HplInterruptP.ACCV;
+
+ components HplMsp430InterruptSigP;
+ HplInterruptP.SIGNAL_NMI_VECTOR -> HplMsp430InterruptSigP.SIGNAL_NMI_VECTOR;
}
Index: HplMsp430InterruptNMIP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/HplMsp430InterruptNMIP.nc,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** HplMsp430InterruptNMIP.nc 7 Nov 2006 19:31:02 -0000 1.3
--- HplMsp430InterruptNMIP.nc 17 Apr 2008 22:38:34 -0000 1.4
***************
*** 28,35 ****
provides interface HplMsp430Interrupt as OF;
provides interface HplMsp430Interrupt as ACCV;
}
implementation
{
! TOSH_SIGNAL(NMI_VECTOR)
{
volatile int n = IFG1;
--- 28,36 ----
provides interface HplMsp430Interrupt as OF;
provides interface HplMsp430Interrupt as ACCV;
+ uses interface HplMsp430InterruptSig as SIGNAL_NMI_VECTOR;
}
implementation
{
! inline async event void SIGNAL_NMI_VECTOR.fired()
{
volatile int n = IFG1;
Index: HplMsp430InterruptP.nc
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tos/chips/msp430/pins/HplMsp430InterruptP.nc,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** HplMsp430InterruptP.nc 12 Jul 2006 17:01:43 -0000 1.2
--- HplMsp430InterruptP.nc 17 Apr 2008 22:38:34 -0000 1.3
***************
*** 34,37 ****
--- 34,38 ----
provides interface HplMsp430Interrupt as Port16;
provides interface HplMsp430Interrupt as Port17;
+ uses interface HplMsp430InterruptSig as SIGNAL_PORT1_VECTOR;
#endif
#ifdef __msp430_have_port2
***************
*** 44,47 ****
--- 45,49 ----
provides interface HplMsp430Interrupt as Port26;
provides interface HplMsp430Interrupt as Port27;
+ uses interface HplMsp430InterruptSig as SIGNAL_PORT2_VECTOR;
#endif
***************
*** 51,55 ****
#ifdef __msp430_have_port1
! TOSH_SIGNAL(PORT1_VECTOR)
{
volatile int n = P1IFG & P1IE;
--- 53,57 ----
#ifdef __msp430_have_port1
! inline async event void SIGNAL_PORT1_VECTOR.fired()
{
volatile int n = P1IFG & P1IE;
***************
*** 156,160 ****
#ifdef __msp430_have_port2
! TOSH_SIGNAL(PORT2_VECTOR)
{
volatile int n = P2IFG & P2IE;
--- 158,162 ----
#ifdef __msp430_have_port2
! inline async event void SIGNAL_PORT2_VECTOR.fired()
{
volatile int n = P2IFG & P2IE;
- Previous message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/dma HplMsp430DmaC.nc, 1.4, 1.5 HplMsp430DmaP.nc, 1.4, 1.5
- Next message: [Tinyos-2-commits] CVS: tinyos-2.x/tos/chips/msp430/usart HplMsp430Usart0C.nc, 1.4, 1.5 HplMsp430Usart0P.nc, 1.4, 1.5 HplMsp430Usart1C.nc, 1.4, 1.5 HplMsp430Usart1P.nc, 1.4, 1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Tinyos-2-commits
mailing list