|
Energia msp430f5529 Timer 程序 编译通过,没有进入中断
[复制链接]
#include "Energia.h"
volatile int state=HIGH;
void setup()
{
// put your setup code here, to run once:
pinMode( RED_LED ,OUTPUT); // set P1_0 output
TA1CTL = TASSEL_1+TACLR+ MC_2+TAIE;
}
void loop()
{
// put your main code here, to run repeatedly:
digitalWrite( RED_LED, state); //ser P4_1 high
}
// Timer interrupt service routine
__attribute__((interrupt(TIMER1_A0_VECTOR)))
void Timer_A_int(void)
{
digitalWrite( RED_LED, LOW); //ser P4_1 high
}
|
|