Hi, everyone,

I use the function "tcgetattr" to access /dev/ttyS1,  the messages is above:

*SetupSerial 1: Input/output error*
**
When I change to access /dev/ttyS0, there is no error that will be
displayed.

Could anyone tell me some tips about that? Thank you~

PS:
My platform is Davinci DM6446. and my linux kernel version is Linux version
2.6.10_mvl401-davinci_evm.
My programme is mainly above :
* *
* int fd;
 int nread;
 int i;
 char buff[512];
 char *dev  = "/dev/ttyS1";
 fd = OpenDev(dev);
 if (fd>0)
   set_speed(fd,115200);
 else
   {
      printf("Can't Open Serial Port!\n");
      return 0;
    } *
**
*{*
*...*
* struct termios options;
 if  ( tcgetattr( fd,&options)  !=  0) {
  perror("SetupSerial 1");
  return(FALSE);
 }*
***...*
*}*

-- 
Best Regards!                   zhangshaofeng
       @Xi'an JiaoTong University
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to