This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

5509搞GPRS的问题



我用DSP5509搞GPRS,出现问题:
51程序:
//入口参数    :
//返回值      :0成功
//函数功能    :检测是否有卡
unsigned char AT_TSIM(void)
{
GPRS_timedat=0;GPRS_size=0;
GPRS_RESET_DAT();
printf("AT%%TSIM\r\n");
while((GPRS_timedat<GPRS_TimeOut)&&(GPRS_size<9));
while(GPRS_timedat<1);
if((GPRS_inchar[GPRS_size-1]=='K')&&(GPRS_inchar[GPRS_size-2]=='O')&&(GPRS_inchar[GPRS_size-3]=='1'))
  return 0;
else
  return 1;
}
我移植到5509上:
printf("AT%%TSIM\r\n");
这一句要改成
printf("AT%TSIM\r\n");
少一个%才行,搞不懂。更诡异的是:
while(GPRS_timedat<1);
这一步过不去,我观察变量,GPRS_timedat=32,32>1,应该可以跳出去,可是就卡在那。
请高手支招,谢谢!