X-Git-Url: https://oss.titaniummirror.com/gitweb/?p=tinyos-2.x.git;a=blobdiff_plain;f=tos%2Fchips%2Fmsp430%2Fpins%2FHplMsp430InterruptP.nc;h=37d57f0ec10d44f65130d29e802b95412942b93a;hp=4c8d899062e9ff0111b84e34b7cc7a2be684b695;hb=48666eab550362c629ba4dcb7d107b9d44b9ba6c;hpb=26d7f5a6239a0f8fbb76588b3562654823acd43f diff --git a/tos/chips/msp430/pins/HplMsp430InterruptP.nc b/tos/chips/msp430/pins/HplMsp430InterruptP.nc index 4c8d8990..37d57f0e 100644 --- a/tos/chips/msp430/pins/HplMsp430InterruptP.nc +++ b/tos/chips/msp430/pins/HplMsp430InterruptP.nc @@ -22,9 +22,9 @@ /** * @author Joe Polastre */ -module HplMsp430InterruptP +module HplMsp430InterruptP @safe() { -#ifdef __msp430_have_port1 +#if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__) provides interface HplMsp430Interrupt as Port10; provides interface HplMsp430Interrupt as Port11; provides interface HplMsp430Interrupt as Port12; @@ -33,9 +33,8 @@ module HplMsp430InterruptP provides interface HplMsp430Interrupt as Port15; provides interface HplMsp430Interrupt as Port16; provides interface HplMsp430Interrupt as Port17; - uses interface HplMsp430InterruptSig as SIGNAL_PORT1_VECTOR; #endif -#ifdef __msp430_have_port2 +#if defined(__MSP430_HAS_PORT2__) || defined(__MSP430_HAS_PORT2_R__) provides interface HplMsp430Interrupt as Port20; provides interface HplMsp430Interrupt as Port21; provides interface HplMsp430Interrupt as Port22; @@ -44,15 +43,14 @@ module HplMsp430InterruptP provides interface HplMsp430Interrupt as Port25; provides interface HplMsp430Interrupt as Port26; provides interface HplMsp430Interrupt as Port27; - uses interface HplMsp430InterruptSig as SIGNAL_PORT2_VECTOR; #endif } implementation { -#ifdef __msp430_have_port1 - inline async event void SIGNAL_PORT1_VECTOR.fired() +#if defined(__MSP430_HAS_PORT1__) || defined(__MSP430_HAS_PORT1_R__) + TOSH_SIGNAL(PORT1_VECTOR) { volatile int n = P1IFG & P1IE; @@ -156,8 +154,8 @@ implementation } #endif -#ifdef __msp430_have_port2 - inline async event void SIGNAL_PORT2_VECTOR.fired() +#if defined(__MSP430_HAS_PORT2__) || defined(__MSP430_HAS_PORT2_R__) + TOSH_SIGNAL(PORT2_VECTOR) { volatile int n = P2IFG & P2IE;