int main(void)
{
int fd_SIM300_Uart2=-1;
int i,nRead=0;
unsigned char data[40];
unsigned char data1[40];
char *pdata="AT\r";
fd_SIM300_Uart2= open("/dev/s3c2410_serial1", O_RDWR);
init_ttyS(fd_SIM300_Uart2);
tcflush(fd_SIM300_Uart2, TCIOFLUSH);
/*用于测试1*/
printf("等待模块启动\n");
while(( nRead=read(fd_SIM300_Uart2,data1,40))<1);
data1[nRead]='\0';
printf("the num of response is :%d\n",nRead);
printf("the data read are :%s\n",data1);
while(( nRead=read(fd_SIM300_Uart2,data,40))<1);
data[nRead]='\0';
printf("the num of response is :%d\n",nRead);
printf("the data read are :%s\n",data);