msp430f449的一个程序,总出错,错误在中断服务程序那里,错误提示在最下面,不知道是怎么回事,还有就是430的16个中断函数用C语言怎么写?
#include "msp430x44x.h"
void main() { WDTCTL=WDTPW+WDTHOLD; FLL_CTL1|=SMCLKOFF+SELM_XT2; TACTL|=TASSEL_1+TACLR+TAIE+MC_1; P1DIR|=0x01; TACTL|=MC_2; _EINT(); for(;;) { _BIS_SR(LPM3_bits); _NOP(); } }
/*下面这些出错:*/
#pragma vector=TIMERA_VECTOR //该行为22行 _interrupt void Timer_A() { switch(TAIV) { case 2:break; case 4:break; case 10:P1OUT^=0x01;break; } }
错误说明:
Error[Pe077]: this declaration has no storage class or type specifier 23 Warning[Pe609]: this kind of pragma may not be used here 22 Error[Pe065]: expected a ";" 23 Warning[Pe001]: last line of file ends without a newline 31 Warning[Pe012]: parsing restarts here after previous syntax error 31
|