graphlcd-base/glcddrivers/port.c
changeset 14 ccaf76b245ec
parent 7 aac14789cd1d
child 15 cba463042186
equal deleted inserted replaced
10:9798f65f2f35 14:ccaf76b245ec
   289 int cSerialPort::Open(const char * device, void (*FP)(int))
   289 int cSerialPort::Open(const char * device, void (*FP)(int))
   290 {
   290 {
   291     struct termios options;
   291     struct termios options;
   292     struct sigaction saio;
   292     struct sigaction saio;
   293 
   293 
   294     fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY);
   294     fd = open(device, O_RDWR | O_NOCTTY | O_NDELAY | O_NONBLOCK);
   295     if (fd == -1)
   295     if (fd == -1)
   296     {
   296     {
   297         printf("error opening port\n");
   297         printf("error opening port\n");
   298         return -1;
   298         return -1;
   299     }
   299     }