用PE生成的函数,如果用上位机的串口调试软件,可以发送和字符和字符串,同时,也能够收到相应的字符和字符串。 现在的问题是我想把收到的这个字符串存到变量里,可是在如下的函数中,只能保存最后一个字符,这是为什么呢 谢谢大家了 void main(void) { /* Write your local variable definition here */ /*** Processor Expert internal initialization. DON'T REMOVE THIS CODE!!! ***/ PE_low_level_init();
/*** End of Processor Expert internal initialization. ***/
for(;;) { i=0; if(AS1_GetCharsInRxBuf()!=0) { AS1_RecvChar(&data); string=wwww; i++; AS1_SendChar(data); }
} /* Write your code here */
/*** Processor Expert end of main routine. DON'T MODIFY THIS CODE!!! ***/ for(;;){} /*** Processor Expert end of main routine. DON'T WRITE CODE BELOW!!! ***/ } /*** End of ma
I8e4PAZ7.rar (473.19 KB)
[此贴子已经被作者于2009-2-9 14:51:53编辑过] |