关于全局变量与STATIC的问题
瓦力的弟弟 2009-01-17 09:32:20 我定义了一个全局变量unsigned char,没想到在我没用它的时候他竟然敢自己在变,我就把它定义为STATIC,还是变,让我有点郁闷呀!哪位告我呀.部分代码如下
static u8 PipeLine=0;//发送流程,0无发送,1有发送,2发送完毕
int main(void)
{
uart_init();
InitMcuForMacAdaptor_RfCc1100();
if(MacAdaptor_RfCc1100_Init())
{
Hard_Uart_SendByte(0xa2);
}
else
{
Hard_Uart_SendByte(0xbb);
}
Hard_Uart_SendByte(0xff);
Hard_Uart_SendByte(0xff);
Hard_Uart_SendByte(0xff);
SET_LED3_ON;
while(1)
{
Cc1100RxControl();
Cc1100TxControl();
}
}