AVR单片机:[求助]IAR下编译出错问题
在IAR环境下,以下代码编译无法通过,哪位高手能指点一二?!!
#if IAR_VERSION < 200
错误指向这里-------》 interrupt [UART_TX_vect] void UART_TX_interrupt (void)
#else
#pragma vector=UART_TX_vect
__interrupt void UART_TX_interrupt (void)
#endif
{
UartTxCount--; /* Decrement number of
characters left to send */
if (UartTxCount) {
UDR = UartTxBuf[UartTxRdPtr]; /* Place next character
into UART transmit register */
UartTxRdPtr++; /* Advance to next
character */
OSSemPost(UartTxSem); /* Signal that we have
room for one more character */
} else {
UCR &= ~0x40; /* Disable UART
transmit complete interrupt */
}
}
C:\SOFTWARE\UCOS-II\IAR\TEST\Test.c (189) : Error[Pe077]: this declaration has
no storage class or type specifier
C:\SOFTWARE\UCOS-II\IAR\TEST\Test.c (189) : Error[Pe065]: expected a ";"
C:\SOFTWARE\UCOS-II\IAR\TEST\Test.c (346) : Warning[Pe012]: parsing restarts
here after previous syntax error
发表时间:2002年11月28日10:12:00