int nread; // char *dev = "/dev/s3c_serial0"; //串口二 char *dev = "/dev/ttyS0"; //串口二 int ret=0;
//open the serial and configure it fd = OpenDev(dev); set_speed(fd,9600); if (set_Parity(fd,8,1,'N') == FALSE) { printf("Set Parity Errorn"); exit (0); } pCb=malloc(sizeof(Cmd_Buf)); pCb->size=0; //start the read and write thread