From nigel@algor.co.uk.
* ser-go32.c (dos_close): Don't crash if scb null. (dos_sendbreak): New function. (dos_ops): Point to dos_sendbreak. (dos_info): Calculate COM number correctly.
This commit is contained in:
parent
a81ce07da8
commit
ccbae88965
2 changed files with 38 additions and 4 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Jan 31 11:14:44 1995 Steve Chamberlain <sac@splat>
|
||||||
|
|
||||||
|
From nigel@algor.co.uk.
|
||||||
|
* ser-go32.c (dos_close): Don't crash if scb null.
|
||||||
|
(dos_sendbreak): New function.
|
||||||
|
(dos_ops): Point to dos_sendbreak.
|
||||||
|
(dos_info): Calculate COM number correctly.
|
||||||
|
|
||||||
Tue Jan 31 09:40:11 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
|
Tue Jan 31 09:40:11 1995 Jim Kingdon (kingdon@lioth.cygnus.com)
|
||||||
|
|
||||||
* xcoffread.c (process_xcoff_symbol): Use new variables
|
* xcoffread.c (process_xcoff_symbol): Use new variables
|
||||||
|
|
|
@ -552,9 +552,13 @@ static void
|
||||||
dos_close (scb)
|
dos_close (scb)
|
||||||
serial_t scb;
|
serial_t scb;
|
||||||
{
|
{
|
||||||
struct dos_ttystate *port = &ports[scb->fd];
|
struct dos_ttystate *port;
|
||||||
struct intrupt *intrupt;
|
struct intrupt *intrupt;
|
||||||
|
|
||||||
|
if (!scb)
|
||||||
|
return;
|
||||||
|
|
||||||
|
port = &ports[scb->fd];
|
||||||
if (!(intrupt = port->intrupt))
|
if (!(intrupt = port->intrupt))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -768,6 +772,28 @@ dos_write (scb, str, len)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
dos_sendbreak (scb)
|
||||||
|
serial_t scb;
|
||||||
|
{
|
||||||
|
volatile struct dos_ttystate *port = &ports[scb->fd];
|
||||||
|
unsigned char cfcr;
|
||||||
|
long then;
|
||||||
|
|
||||||
|
cfcr = inb(port, com_cfcr);
|
||||||
|
outb(port, com_cfcr, cfcr | CFCR_SBREAK);
|
||||||
|
|
||||||
|
/* 0.25 sec delay */
|
||||||
|
then = rawclock () + RAWHZ / 4;
|
||||||
|
while ((rawclock () - then) < 0)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
outb(port, com_cfcr, cfcr);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static struct serial_ops dos_ops =
|
static struct serial_ops dos_ops =
|
||||||
{
|
{
|
||||||
"hardwire",
|
"hardwire",
|
||||||
|
@ -778,7 +804,7 @@ static struct serial_ops dos_ops =
|
||||||
dos_write,
|
dos_write,
|
||||||
dos_noop, /* flush output */
|
dos_noop, /* flush output */
|
||||||
dos_flush_input,
|
dos_flush_input,
|
||||||
dos_noop, /* send break -- currently used only for nindy */
|
dos_sendbreak,
|
||||||
dos_raw,
|
dos_raw,
|
||||||
dos_get_tty_state,
|
dos_get_tty_state,
|
||||||
dos_set_tty_state,
|
dos_set_tty_state,
|
||||||
|
@ -800,12 +826,12 @@ dos_info (arg, from_tty)
|
||||||
{
|
{
|
||||||
if (port->baudrate == 0)
|
if (port->baudrate == 0)
|
||||||
continue;
|
continue;
|
||||||
printf_filtered ("Port:\tCOM%d (%sactive)\n", port - ports,
|
printf_filtered ("Port:\tCOM%d (%sactive)\n", port - ports + 1,
|
||||||
port->intrupt ? "" : "not ");
|
port->intrupt ? "" : "not ");
|
||||||
printf_filtered ("Addr:\t0x%03x (irq %d)\n", port->base, port->irq);
|
printf_filtered ("Addr:\t0x%03x (irq %d)\n", port->base, port->irq);
|
||||||
printf_filtered ("16550:\t%s\n", port->fifo ? "yes" : "no");
|
printf_filtered ("16550:\t%s\n", port->fifo ? "yes" : "no");
|
||||||
printf_filtered ("Speed:\t%d baud\n", port->baudrate);
|
printf_filtered ("Speed:\t%d baud\n", port->baudrate);
|
||||||
printf_filtered ("Errs:\tframing %d parity %d overflow %d\n",
|
printf_filtered ("Errs:\tframing %d parity %d overflow %d\n\n",
|
||||||
port->ferr, port->perr, port->oflo);
|
port->ferr, port->perr, port->oflo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue