|
关于eZ430-RF2500 程序报错:incomplete type is not allowed
[复制链接]
我要把CC2500接受的数据通过UART口发送到PC端(就是用eZ430-RF2500的AP端)。我在eZ430-RF2500的光盘里的demo_AP.c里找到
void TXString( char* string, int length );
void MCU_Init(void);
MCU_Init();
//Transmit splash screen and network init notification
TXString( (char*)splash, sizeof splash);
TXString( "\r\nInitializing Network....", 26 );
TXString(rxBuffer, sizeof rxBuffer );
void TXString( char* string, int length )
{
int pointer;
for( pointer = 0; pointer < length; pointer++)
{
volatile int i;
UCA0TXBUF = string[pointer];
while (!(IFG2&UCA0TXIFG)); // USCI_A0 TX buffer ready?
}
}
void MCU_Init()
{
BCSCTL1 = CALBC1_8MHZ; // Set DCO
DCOCTL = CALDCO_8MHZ;
BCSCTL3 |= LFXT1S_2; // LFXT1 = VLO
TACCTL0 = CCIE; // TACCR0 interrupt enabled
TACCR0 = 12000; // ~1 second
TACTL = TASSEL_1 + MC_1; // ACLK, upmode
P3SEL |= 0x30; // P3.4,5 = USCI_A0 TXD/RXD
UCA0CTL1 = UCSSEL_2; // SMCLK
UCA0BR0 = 0x41; // 9600 from 8Mhz
UCA0BR1 = 0x3;
UCA0MCTL = UCBRS_2;
UCA0CTL1 &= ~UCSWRST; // **Initialize USCI state machine**
IE2 |= UCA0RXIE; // Enable USCI_A0 RX interrupt
__enable_interrupt();
}
我将这个程序嵌到我的主函数中,编译以后说是incomplete type is not allowed.( TXString(rxBuffer, sizeof rxBuffer);)
请问有添加过在自己的函数中添加UART传输部分的代码(即向PC端传输数据),是不是我少添加了什么?请问是哪里出的问题呢?
谢谢大家指教
|
|