Browse Source

fix the cts return

Xiangfu 13 years ago
parent
commit
04c9b29ac0
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fpgautils.c

+ 1 - 1
fpgautils.c

@@ -581,7 +581,7 @@ int get_serial_cts(int fd)
 		return -1;
 		return -1;
 
 
 	ioctl(fd, TIOCMGET, &flags);
 	ioctl(fd, TIOCMGET, &flags);
-	return flags & TIOCM_CTS;
+	return (flags & TIOCM_CTS) ? 1 : 0;
 }
 }
 
 
 int set_serial_rts(int fd, int rts)
 int set_serial_rts(int fd, int rts)