diff options
author | Andrew Cagney <cagney@redhat.com> | 2001-07-15 20:34:14 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2001-07-15 20:34:14 +0000 |
commit | 2cd58942b9bf50ccde261085d8a2b3e7ced88e5e (patch) | |
tree | 9782ed43082f4838f54567f55f29e64ed1cd3312 /gdb/nindy-share | |
parent | ea7c478fe2e8aac579da890b1861677fa6bea5eb (diff) | |
download | gdb-2cd58942b9bf50ccde261085d8a2b3e7ced88e5e.zip gdb-2cd58942b9bf50ccde261085d8a2b3e7ced88e5e.tar.gz gdb-2cd58942b9bf50ccde261085d8a2b3e7ced88e5e.tar.bz2 |
* serial.h (SERIAL_ASYNC): Delete.
(DEPRECATED_SERIAL_FD): Delete.
(SERIAL_DEBUG): Delete.
(SERIAL_DEBUG_P): Delete.
(SERIAL_DRAIN_OUTPUT): Delete.
(SERIAL_FLUSH_OUTPUT): Delete.
(SERIAL_FLUSH_INPUT): Delete.
(SERIAL_SEND_BREAK): Delete.
(SERIAL_RAW): Delete.
(SERIAL_GET_TTY_STATE): Delete.
(SERIAL_SET_TTY_STATE): Delete.
(SERIAL_PRINT_TTY_STATE): Delete.
(SERIAL_NOFLUSH_SET_TTY_STATE): Delete.
(SERIAL_SETBAUDRATE): Delete.
(SERIAL_SETSTOPBITS): Delete.
(SERIAL_CAN_ASYNC_P): Delete.
(SERIAL_IS_ASYNC_P): Delete.
(SERIAL_UN_FDOPEN): Delete.
(SERIAL_READCHAR): Delete.
(SERIAL_CLOSE): Delete.
(SERIAL_FDOPEN): Delete.
(SERIAL_OPEN): Delete.
Diffstat (limited to 'gdb/nindy-share')
-rw-r--r-- | gdb/nindy-share/Onindy.c | 14 | ||||
-rw-r--r-- | gdb/nindy-share/nindy.c | 32 | ||||
-rw-r--r-- | gdb/nindy-share/ttyflush.c | 6 |
3 files changed, 26 insertions, 26 deletions
diff --git a/gdb/nindy-share/Onindy.c b/gdb/nindy-share/Onindy.c index f89bafd..f544183 100644 --- a/gdb/nindy-share/Onindy.c +++ b/gdb/nindy-share/Onindy.c @@ -185,7 +185,7 @@ static int readchar() { /* FIXME: Do we really want to be reading without a timeout? */ - return SERIAL_READCHAR (nindy_serial, -1); + return serial_readchar (nindy_serial, -1); } /****************************************************************************** @@ -222,10 +222,10 @@ getpkt (buf) fprintf(stderr, "Bad checksum (recv=0x%02x; calc=0x%02x); retrying\r\n", recv, csum ); - SERIAL_WRITE (nindy_serial, "-", 1); + serial_write (nindy_serial, "-", 1); } - SERIAL_WRITE (nindy_serial, "+", 1); + serial_write (nindy_serial, "+", 1); } @@ -257,12 +257,12 @@ putpkt( cmd ) resend = 1; do { if ( resend ) { - SERIAL_WRITE ( nindy_serial, "\020", 1 ); - SERIAL_WRITE( nindy_serial, cmd, strlen(cmd) ); - SERIAL_WRITE( nindy_serial, checksum, strlen(checksum) ); + serial_write ( nindy_serial, "\020", 1 ); + serial_write( nindy_serial, cmd, strlen(cmd) ); + serial_write( nindy_serial, checksum, strlen(checksum) ); } /* FIXME: do we really want to be reading without timeout? */ - ack = SERIAL_READCHAR (nindy_serial, -1); + ack = serial_readchar (nindy_serial, -1); if (ack < 0) { fprintf (stderr, "error reading from serial port\n"); diff --git a/gdb/nindy-share/nindy.c b/gdb/nindy-share/nindy.c index f32b1a2..77dd734 100644 --- a/gdb/nindy-share/nindy.c +++ b/gdb/nindy-share/nindy.c @@ -235,7 +235,7 @@ rdnin (buf,n,timeout) escape_seen = 0; while (n) { - c = SERIAL_READCHAR (nindy_serial, timeout); + c = serial_readchar (nindy_serial, timeout); switch (c) { case SERIAL_ERROR: @@ -308,14 +308,14 @@ getpkt(buf) cs_calc += buf[i]; } if ( cs_calc == cs_recv ){ - SERIAL_WRITE (nindy_serial, "+", 1); + serial_write (nindy_serial, "+", 1); return hdr[2]; } /* Bad checksum: report, send NAK, and re-receive */ fprintf(stderr, errfmt, cs_recv, cs_calc ); - SERIAL_WRITE (nindy_serial, "-", 1); + serial_write (nindy_serial, "-", 1); } } @@ -367,7 +367,7 @@ putpkt( msg, len ) /* Attention, NINDY! */ - SERIAL_WRITE (nindy_serial, "\020", 1); + serial_write (nindy_serial, "\020", 1); lenlo = len & 0xff; @@ -387,19 +387,19 @@ putpkt( msg, len ) /* Send checksummed message over and over until we get a positive ack */ - SERIAL_WRITE (nindy_serial, buf, p - buf); + serial_write (nindy_serial, buf, p - buf); while (1){ if ( !rdnin(&ack,1,5) ){ /* timed out */ fprintf(stderr,"ACK timed out; resending\r\n"); /* Attention, NINDY! */ - SERIAL_WRITE (nindy_serial, "\020", 1); - SERIAL_WRITE (nindy_serial, buf, p - buf); + serial_write (nindy_serial, "\020", 1); + serial_write (nindy_serial, buf, p - buf); } else if ( ack == '+' ){ return; } else if ( ack == '-' ){ fprintf( stderr, "Remote NAK; resending\r\n" ); - SERIAL_WRITE (nindy_serial, buf, p - buf); + serial_write (nindy_serial, buf, p - buf); } else { fprintf( stderr, "Bad ACK, ignored: <%c>\r\n", ack ); } @@ -520,15 +520,15 @@ try_baudrate (serial, brp) unsigned char c; /* Set specified baud rate and flush all pending input */ - SERIAL_SETBAUDRATE (serial, brp->rate); + serial_setbaudrate (serial, brp->rate); tty_flush (serial); /* Send empty command with bad checksum, hope for NAK ('-') response */ - SERIAL_WRITE (serial, "\020\0\0\001", 4); + serial_write (serial, "\020\0\0\001", 4); /* Anything but a quick '-', including error, eof, or timeout, means that this baudrate doesn't work. */ - return SERIAL_READCHAR (serial, 1) == '-'; + return serial_readchar (serial, 1) == '-'; } /****************************************************************************** @@ -576,7 +576,7 @@ autobaud( serial, brp ) ninBaud (brp->string); /* Change our baud rate back to rate to which we just set NINDY. */ - SERIAL_SETBAUDRATE (serial, brp->rate); + serial_setbaudrate (serial, brp->rate); } /********************************** @@ -615,7 +615,7 @@ ninBaud( baudrate ) csum += *p; } sprintf (msg, "\020z%s#%02x", baudrate, csum); - SERIAL_WRITE (nindy_serial, msg, strlen (msg)); + serial_write (nindy_serial, msg, strlen (msg)); } else { @@ -714,17 +714,17 @@ ninConnect( name, baudrate, brk, silent, old_protocol ) p = xmalloc(strlen(prefix[i]) + strlen(name) + 1 ); strcpy( p, prefix[i] ); strcat( p, name ); - nindy_serial = SERIAL_OPEN (p); + nindy_serial = serial_open (p); if (nindy_serial != NULL) { #ifdef TIOCEXCL /* Exclusive use mode (hp9000 does not support it) */ ioctl(nindy_serial->fd,TIOCEXCL,NULL); #endif - SERIAL_RAW (nindy_serial); + serial_raw (nindy_serial); if (brk) { - SERIAL_SEND_BREAK (nindy_serial); + serial_send_break (nindy_serial); } brp = parse_baudrate( baudrate ); diff --git a/gdb/nindy-share/ttyflush.c b/gdb/nindy-share/ttyflush.c index 786850a..f9aaa2e 100644 --- a/gdb/nindy-share/ttyflush.c +++ b/gdb/nindy-share/ttyflush.c @@ -31,10 +31,10 @@ tty_flush (serial) { while (1) { - SERIAL_FLUSH_INPUT (serial); - SERIAL_FLUSH_OUTPUT (serial); + serial_flush_input (serial); + serial_flush_output (serial); sleep(1); - switch (SERIAL_READCHAR (serial, 0)) + switch (serial_readchar (serial, 0)) { case SERIAL_TIMEOUT: case SERIAL_ERROR: |