diff --git a/cpu/cc430/hwtimer_cc430.c b/cpu/cc430/hwtimer_cc430.c index b83de4da9..b5843ca23 100644 --- a/cpu/cc430/hwtimer_cc430.c +++ b/cpu/cc430/hwtimer_cc430.c @@ -15,17 +15,15 @@ void timerA_init() TA0CTL = TASSEL_1 + TACLR; // Clear the timer counter, set ACLK TA0CTL &= ~TAIE; // Clear the IFG -/* volatile unsigned int *ccr = &TA0CCR0; + volatile unsigned int *ccr = &TA0CCR0; volatile unsigned int *ctl = &TA0CCTL0; for (int i = 0; i < ARCH_MAXTIMERS; i++) { - *ccr = 0; - *ctl &= ~(CCIFG); - *ctl &= ~(CCIE); + *(ccr+i) = 0; + *(ctl+i) &= ~(CCIFG); + *(ctl+i) &= ~(CCIE); } - */ - TA0CCR0 = 0; TA0CTL |= MC_2; } @@ -43,12 +41,12 @@ interrupt(TIMER0_A1_VECTOR) __attribute__ ((naked)) timer0_a1_5_isr(void) { short taiv = TA0IV; short timer; - switch(taiv) { - case TAIFG: + if (!(taiv & TAIFG)) { +// case TAIFG: timer = (taiv/2); TA0_unset(timer); int_handler(timer); - break; + /* break; // Timer0_A3 Configurable periodic IRQ (used by button_repeat and buzzer) case 0x06: // Disable IE @@ -66,7 +64,7 @@ interrupt(TIMER0_A1_VECTOR) __attribute__ ((naked)) timer0_a1_5_isr(void) { TA0CCTL4 &= ~CCIE; // Reset IRQ flag TA0CCTL4 &= ~CCIFG; - break; + break;*/ } __exit_isr(); diff --git a/cpu/msp430-common/Jamfile b/cpu/msp430-common/Jamfile index 540398c72..19e40bb30 100644 --- a/cpu/msp430-common/Jamfile +++ b/cpu/msp430-common/Jamfile @@ -27,7 +27,7 @@ SubDir TOP cpu msp430-common ; -Module cpu : msp430-main.c cpu.c atomic.c irq.c flashrom.c ; +Module cpu : msp430-main.c cpu.c atomic.c irq.c ; Module hwtimer_msp430 : hwtimer_cpu.c ; UseModule cpu ; diff --git a/cpu/msp430-common/flashrom.c b/cpu/msp430-common/flashrom.c index 1c96e14b0..dff02c053 100644 --- a/cpu/msp430-common/flashrom.c +++ b/cpu/msp430-common/flashrom.c @@ -1,5 +1,4 @@ #include -#include #include #include