From 6fb2302e6554741d357b71a42edcc1ef6134cb01 Mon Sep 17 00:00:00 2001 From: tsarna Date: Wed, 25 Jun 2003 15:12:16 +0000 Subject: Add some fixes to serial I/O --- cross/icdprog/distinfo | 3 ++- cross/icdprog/patches/patch-ab | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 cross/icdprog/patches/patch-ab (limited to 'cross') diff --git a/cross/icdprog/distinfo b/cross/icdprog/distinfo index 6c67eaaaa39..bf6a91b4da7 100644 --- a/cross/icdprog/distinfo +++ b/cross/icdprog/distinfo @@ -1,5 +1,6 @@ -$NetBSD: distinfo,v 1.1.1.1 2003/05/28 16:10:46 tsarna Exp $ +$NetBSD: distinfo,v 1.2 2003/06/25 15:12:16 tsarna Exp $ SHA1 (icdprog-0.3.tar.gz) = 4e8a8aac8845c531971b7a371d6dc5a9d460dbea Size (icdprog-0.3.tar.gz) = 8714 bytes SHA1 (patch-aa) = 05e8cb5e69822ad854bd48bfcf0b24ea5b84ad22 +SHA1 (patch-ab) = d781da4b1f6c1cd76353df69a2d3fe28178cd783 diff --git a/cross/icdprog/patches/patch-ab b/cross/icdprog/patches/patch-ab new file mode 100644 index 00000000000..aa69b14ee50 --- /dev/null +++ b/cross/icdprog/patches/patch-ab @@ -0,0 +1,35 @@ +$NetBSD: patch-ab,v 1.1 2003/06/25 15:12:17 tsarna Exp $ + +--- icd.c.orig Sat Jun 21 17:05:22 2003 ++++ icd.c Sat Jun 21 17:30:45 2003 +@@ -278,7 +278,7 @@ + { + struct termios oldtio, newtio; + +- if((icd_fd=open(port, O_NOCTTY | O_RDWR | O_SYNC)) == -1) { ++ if((icd_fd=open(port, O_NOCTTY | O_RDWR | O_SYNC | O_NONBLOCK)) == -1) { + perror("Error opening device:"); + return -1; + } +@@ -286,10 +286,11 @@ + tcgetattr(icd_fd, &oldtio); + + memset(&newtio,0, sizeof(newtio)); +- newtio.c_cflag = BAUDRATE | CS8 | CLOCAL | CREAD; ++ newtio.c_cflag = CS8 | CLOCAL | CREAD; + newtio.c_iflag = IGNPAR; + newtio.c_oflag = 0; + newtio.c_lflag = 0; ++ newtio.c_ispeed = newtio.c_ospeed = BAUDRATE; + + newtio.c_cc[VTIME] = 20; + newtio.c_cc[VMIN] = 0; +@@ -297,6 +298,8 @@ + tcflush(icd_fd, TCIFLUSH); + tcsetattr(icd_fd, TCSANOW, &newtio); + ++ fcntl(icd_fd, F_SETFL, 0); /* clear nonblock */ ++ + icd_hw_reset(); + + rts_set(); -- cgit v1.2.3