Add detection of IMB and IMBRange SWIs.
[deliverable/binutils-gdb.git] / gdb / ser-e7kpc.c
index a2adef9585a32539ff845744e44032c6f5ea28a5..fae08594c0660250055dfc9122214af5fcc4013f 100644 (file)
@@ -1,22 +1,21 @@
 /* Remote serial interface using Hitachi E7000 PC ISA card in a PC
+   Copyright 1994, 1999 Free Software Foundation, Inc.
 
-   Copyright 1994 Free Software Foundation, Inc.
+This file is part of GDB.
 
-   This file is part of GDB.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
-   This program is free software; you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2 of the License, or
-   (at your option) any later version.
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program; if not, write to the Free Software
-   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
 #if defined __GO32__ || defined _WIN32
 #include "defs.h"
 #ifdef _MSC_VER
 #define strncasecmp strnicmp
 #define WIN32_LEAN_AND_MEAN
+#endif
+
+#ifdef _WIN32
 #include <windows.h>
-#define W32SUT_32
-#include "mswin/w32sut.h"
 #endif
 
 #ifdef __GO32__
@@ -44,13 +44,6 @@ static int e7000pc_write PARAMS ((serial_t scb, const char *str, int len));
 static void e7000pc_close PARAMS ((serial_t scb));
 static serial_ttystate e7000pc_get_tty_state PARAMS ((serial_t scb));
 static int e7000pc_set_tty_state PARAMS ((serial_t scb, serial_ttystate state));
-static char *aptr PARAMS ((short p));
-
-static int dos_async_init PARAMS ((int port));
-static void dos_async_tx PARAMS ((const char c));
-static int dos_async_rx PARAMS (());
-
-
 
 #define OFF_DPD        0x0000
 #define OFF_DDP        0x1000
@@ -119,7 +112,7 @@ static struct sw
   {0x17, 0xdc000},
   0};
 
-#ifndef __GO32__
+#ifdef _MSC_VER
 /* Get the base of the data segment.  This is needed to calculate the offset
    between data segment addresses and the base of linear memory, which is where
    device registers reside.  Note that this is really only necessary for
@@ -146,9 +139,9 @@ get_ds_base (void)
 
   return dsbase;
 }
-#else /* !__GO32__ */
+#else /* !_MSC_VER */
 #define get_ds_base() 0
-#endif /* __GO32__ */ 
+#endif /* _MSC_VER */ 
 
 static int
 e7000pc_init ()
@@ -307,7 +300,7 @@ dosasync_write (fd, buf, len)
   ((short *)dummy)[3] = 0;
   for (i = 0; i < len ; i++) 
     {
-      dummy[8 + i ^ 1] = buf[i];
+      dummy[(8 + i) ^ 1] = buf[i];
     }
 
   /* Wait for the card to get ready */
@@ -459,6 +452,7 @@ static struct serial_ops e7000pc_ops =
   e7000pc_print_tty_state,
   e7000pc_noflush_set_tty_state,
   e7000pc_setbaudrate,
+  e7000pc_noop,                        /* wait for output to drain */
 };
 
 void
This page took 0.02396 seconds and 4 git commands to generate.