GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Functions | Variables
ser-go32.c File Reference
#include "defs.h"
#include "gdbcmd.h"
#include "serial.h"
#include <time.h>
#include <dos.h>
#include <go32.h>
#include <dpmi.h>

Go to the source code of this file.

Classes

struct  intrupt
 
struct  dos_ttystate
 

Macros

#define COM1ADDR   0x3f8
 
#define COM2ADDR   0x2f8
 
#define COM3ADDR   0x3e8
 
#define COM4ADDR   0x3e0
 
#define com_data   0 /* data register (R/W) */
 
#define com_dlbl   0 /* divisor latch low (W) */
 
#define com_ier   1 /* interrupt enable (W) */
 
#define com_dlbh   1 /* divisor latch high (W) */
 
#define com_iir   2 /* interrupt identification (R) */
 
#define com_fifo   2 /* FIFO control (W) */
 
#define com_lctl   3 /* line control register (R/W) */
 
#define com_cfcr   3 /* line control register (R/W) */
 
#define com_mcr   4 /* modem control register (R/W) */
 
#define com_lsr   5 /* line status register (R/W) */
 
#define com_msr   6 /* modem status register (R/W) */
 
#define COMTICK   (1843200/16)
 
#define SPEED_TOLERANCE   30 /* thousandths; real == desired +- 3.0% */
 
#define IER_ERXRDY   0x1 /* int on rx ready */
 
#define IER_ETXRDY   0x2 /* int on tx ready */
 
#define IER_ERLS   0x4 /* int on line status change */
 
#define IER_EMSC   0x8 /* int on modem status change */
 
#define IIR_FIFO_MASK   0xc0 /* set if FIFOs are enabled */
 
#define IIR_IMASK   0xf /* interrupt cause mask */
 
#define IIR_NOPEND   0x1 /* nothing pending */
 
#define IIR_RLS   0x6 /* receive line status */
 
#define IIR_RXRDY   0x4 /* receive ready */
 
#define IIR_RXTOUT   0xc /* receive timeout */
 
#define IIR_TXRDY   0x2 /* transmit ready */
 
#define IIR_MLSC   0x0 /* modem status */
 
#define FIFO_ENABLE   0x01 /* enable fifo */
 
#define FIFO_RCV_RST   0x02 /* reset receive fifo */
 
#define FIFO_XMT_RST   0x04 /* reset transmit fifo */
 
#define FIFO_DMA_MODE   0x08 /* enable dma mode */
 
#define FIFO_TRIGGER_1   0x00 /* trigger at 1 char */
 
#define FIFO_TRIGGER_4   0x40 /* trigger at 4 chars */
 
#define FIFO_TRIGGER_8   0x80 /* trigger at 8 chars */
 
#define FIFO_TRIGGER_14   0xc0 /* trigger at 14 chars */
 
#define CFCR_DLAB   0x80 /* divisor latch */
 
#define CFCR_SBREAK   0x40 /* send break */
 
#define CFCR_PZERO   0x30 /* zero parity */
 
#define CFCR_PONE   0x20 /* one parity */
 
#define CFCR_PEVEN   0x10 /* even parity */
 
#define CFCR_PODD   0x00 /* odd parity */
 
#define CFCR_PENAB   0x08 /* parity enable */
 
#define CFCR_STOPB   0x04 /* 2 stop bits */
 
#define CFCR_8BITS   0x03 /* 8 data bits */
 
#define CFCR_7BITS   0x02 /* 7 data bits */
 
#define CFCR_6BITS   0x01 /* 6 data bits */
 
#define CFCR_5BITS   0x00 /* 5 data bits */
 
#define MCR_LOOPBACK   0x10 /* loopback */
 
#define MCR_IENABLE   0x08 /* output 2 = int enable */
 
#define MCR_DRS   0x04 /* output 1 = xxx */
 
#define MCR_RTS   0x02 /* enable RTS */
 
#define MCR_DTR   0x01 /* enable DTR */
 
#define LSR_RCV_FIFO   0x80 /* error in receive fifo */
 
#define LSR_TSRE   0x40 /* transmitter empty */
 
#define LSR_TXRDY   0x20 /* transmitter ready */
 
#define LSR_BI   0x10 /* break detected */
 
#define LSR_FE   0x08 /* framing error */
 
#define LSR_PE   0x04 /* parity error */
 
#define LSR_OE   0x02 /* overrun error */
 
#define LSR_RXRDY   0x01 /* receiver ready */
 
#define LSR_RCV_MASK   0x1f
 
#define MSR_DCD   0x80
 
#define MSR_RI   0x40
 
#define MSR_DSR   0x20
 
#define MSR_CTS   0x10
 
#define MSR_DDCD   0x08
 
#define MSR_TERI   0x04
 
#define MSR_DDSR   0x02
 
#define MSR_DCTS   0x01
 
#define FIFO_TRIGGER   FIFO_TRIGGER_4
 
#define CBSIZE   4096
 
#define RAWHZ   18
 
#define COUNT(x)
 
#define ICU_BASE   0x20
 
#define ICU_OCW2   (ICU_BASE + 0)
 
#define ICU_MASK   (ICU_BASE + 1)
 
#define NINTR   8
 
#define inb(p, a)   inportb((p)->base + (a))
 
#define outb(p, a, v)   outportb((p)->base + (a), (v))
 
#define disable()   asm volatile ("cli");
 
#define enable()   asm volatile ("sti");
 
#define ISRNAME(x)   dos_comisr##x
 
#define ISR(x)   static void ISRNAME(x)(void) {dos_comisr(x);}
 
#define divrnd(n, q)   (((n) * 2 / (q) + 1) / 2) /* Divide and round off. */
 

Typedefs

typedef unsigned long u_long
 

Functions

static int dos_open (struct serial *scb, const char *name)
 
static void dos_raw (struct serial *scb)
 
static int dos_readchar (struct serial *scb, int timeout)
 
static int dos_setbaudrate (struct serial *scb, int rate)
 
static int dos_write (struct serial *scb, const void *buf, size_t count)
 
static void dos_close (struct serial *scb)
 
static serial_ttystate dos_get_tty_state (struct serial *scb)
 
static int dos_set_tty_state (struct serial *scb, serial_ttystate state)
 
static int dos_baudconv (int rate)
 
static int dos_getc (volatile struct dos_ttystate *port)
 
static int dos_putc (int c, struct dos_ttystate *port)
 
static void dos_comisr (int irq)
 
 ISR (0)
 
static struct intruptdos_hookirq (unsigned int irq)
 
static void dos_unhookirq (struct intrupt *intr)
 
static int dos_flush_output (struct serial *scb)
 
static int dos_setparity (struct serial *scb, int parity)
 
static int dos_drain_output (struct serial *scb)
 
static serial_ttystate dos_copy_tty_state (struct serial *scb, serial_ttystate ttystate)
 
static int dos_flush_input (struct serial *scb)
 
static void dos_print_tty_state (struct serial *scb, serial_ttystate ttystate, struct ui_file *stream)
 
static int dos_setstopbits (struct serial *scb, int num)
 
static int dos_sendbreak (struct serial *scb)
 
int gdb_pipe (int pdes[2])
 
static void info_serial_command (const char *arg, int from_tty)
 
void _initialize_ser_dos ()
 

Variables

unsigned char icu_oldmask
 
static struct intrupt intrupts [NINTR]
 
static struct dos_ttystate ports [4]
 
static const struct serial_ops dos_ops
 

Macro Definition Documentation

◆ CBSIZE

#define CBSIZE   4096

Definition at line 136 of file ser-go32.c.

Referenced by dos_getc(), and dos_putc().

◆ CFCR_5BITS

#define CFCR_5BITS   0x00 /* 5 data bits */

Definition at line 96 of file ser-go32.c.

◆ CFCR_6BITS

#define CFCR_6BITS   0x01 /* 6 data bits */

Definition at line 95 of file ser-go32.c.

◆ CFCR_7BITS

#define CFCR_7BITS   0x02 /* 7 data bits */

Definition at line 94 of file ser-go32.c.

◆ CFCR_8BITS

#define CFCR_8BITS   0x03 /* 8 data bits */

Definition at line 93 of file ser-go32.c.

Referenced by dos_open().

◆ CFCR_DLAB

#define CFCR_DLAB   0x80 /* divisor latch */

Definition at line 85 of file ser-go32.c.

Referenced by dos_open(), and dos_setbaudrate().

◆ CFCR_PENAB

#define CFCR_PENAB   0x08 /* parity enable */

Definition at line 91 of file ser-go32.c.

◆ CFCR_PEVEN

#define CFCR_PEVEN   0x10 /* even parity */

Definition at line 89 of file ser-go32.c.

◆ CFCR_PODD

#define CFCR_PODD   0x00 /* odd parity */

Definition at line 90 of file ser-go32.c.

◆ CFCR_PONE

#define CFCR_PONE   0x20 /* one parity */

Definition at line 88 of file ser-go32.c.

◆ CFCR_PZERO

#define CFCR_PZERO   0x30 /* zero parity */

Definition at line 87 of file ser-go32.c.

◆ CFCR_SBREAK

#define CFCR_SBREAK   0x40 /* send break */

Definition at line 86 of file ser-go32.c.

Referenced by dos_sendbreak().

◆ CFCR_STOPB

#define CFCR_STOPB   0x04 /* 2 stop bits */

Definition at line 92 of file ser-go32.c.

Referenced by dos_setstopbits().

◆ COM1ADDR

#define COM1ADDR   0x3f8

Definition at line 31 of file ser-go32.c.

◆ COM2ADDR

#define COM2ADDR   0x2f8

Definition at line 32 of file ser-go32.c.

◆ COM3ADDR

#define COM3ADDR   0x3e8

Definition at line 33 of file ser-go32.c.

◆ COM4ADDR

#define COM4ADDR   0x3e0

Definition at line 34 of file ser-go32.c.

◆ com_cfcr

#define com_cfcr   3 /* line control register (R/W) */

Definition at line 43 of file ser-go32.c.

Referenced by dos_open(), dos_sendbreak(), dos_setbaudrate(), and dos_setstopbits().

◆ com_data

#define com_data   0 /* data register (R/W) */

Definition at line 36 of file ser-go32.c.

Referenced by dos_comisr(), dos_open(), and dos_write().

◆ com_dlbh

#define com_dlbh   1 /* divisor latch high (W) */

Definition at line 39 of file ser-go32.c.

Referenced by dos_open(), and dos_setbaudrate().

◆ com_dlbl

#define com_dlbl   0 /* divisor latch low (W) */

Definition at line 37 of file ser-go32.c.

Referenced by dos_open(), and dos_setbaudrate().

◆ com_fifo

#define com_fifo   2 /* FIFO control (W) */

Definition at line 41 of file ser-go32.c.

Referenced by dos_close(), dos_flush_input(), and dos_open().

◆ com_ier

#define com_ier   1 /* interrupt enable (W) */

Definition at line 38 of file ser-go32.c.

Referenced by dos_close(), and dos_open().

◆ com_iir

#define com_iir   2 /* interrupt identification (R) */

Definition at line 40 of file ser-go32.c.

Referenced by dos_comisr(), and dos_open().

◆ com_lctl

#define com_lctl   3 /* line control register (R/W) */

Definition at line 42 of file ser-go32.c.

◆ com_lsr

#define com_lsr   5 /* line status register (R/W) */

Definition at line 45 of file ser-go32.c.

Referenced by dos_comisr(), and dos_open().

◆ com_mcr

#define com_mcr   4 /* modem control register (R/W) */

Definition at line 44 of file ser-go32.c.

Referenced by dos_close(), and dos_open().

◆ com_msr

#define com_msr   6 /* modem status register (R/W) */

Definition at line 46 of file ser-go32.c.

Referenced by dos_comisr(), and dos_open().

◆ COMTICK

#define COMTICK   (1843200/16)

Definition at line 54 of file ser-go32.c.

Referenced by dos_baudconv().

◆ COUNT

#define COUNT ( x)

Definition at line 162 of file ser-go32.c.

Referenced by dos_comisr().

◆ disable

#define disable ( )    asm volatile ("cli");

◆ divrnd

#define divrnd ( n,
q )   (((n) * 2 / (q) + 1) / 2) /* Divide and round off. */

◆ enable

#define enable ( )    asm volatile ("sti");

◆ FIFO_DMA_MODE

#define FIFO_DMA_MODE   0x08 /* enable dma mode */

Definition at line 78 of file ser-go32.c.

◆ FIFO_ENABLE

#define FIFO_ENABLE   0x01 /* enable fifo */

Definition at line 75 of file ser-go32.c.

Referenced by dos_flush_input(), and dos_open().

◆ FIFO_RCV_RST

#define FIFO_RCV_RST   0x02 /* reset receive fifo */

Definition at line 76 of file ser-go32.c.

Referenced by dos_flush_input(), and dos_open().

◆ FIFO_TRIGGER

#define FIFO_TRIGGER   FIFO_TRIGGER_4

Definition at line 133 of file ser-go32.c.

Referenced by dos_flush_input(), and dos_open().

◆ FIFO_TRIGGER_1

#define FIFO_TRIGGER_1   0x00 /* trigger at 1 char */

Definition at line 79 of file ser-go32.c.

◆ FIFO_TRIGGER_14

#define FIFO_TRIGGER_14   0xc0 /* trigger at 14 chars */

Definition at line 82 of file ser-go32.c.

◆ FIFO_TRIGGER_4

#define FIFO_TRIGGER_4   0x40 /* trigger at 4 chars */

Definition at line 80 of file ser-go32.c.

◆ FIFO_TRIGGER_8

#define FIFO_TRIGGER_8   0x80 /* trigger at 8 chars */

Definition at line 81 of file ser-go32.c.

◆ FIFO_XMT_RST

#define FIFO_XMT_RST   0x04 /* reset transmit fifo */

Definition at line 77 of file ser-go32.c.

Referenced by dos_open().

◆ ICU_BASE

#define ICU_BASE   0x20

Definition at line 166 of file ser-go32.c.

◆ ICU_MASK

#define ICU_MASK   (ICU_BASE + 1)

Definition at line 168 of file ser-go32.c.

Referenced by _initialize_ser_dos(), dos_hookirq(), and dos_unhookirq().

◆ ICU_OCW2

#define ICU_OCW2   (ICU_BASE + 0)

Definition at line 167 of file ser-go32.c.

Referenced by dos_comisr().

◆ IER_EMSC

#define IER_EMSC   0x8 /* int on modem status change */

Definition at line 61 of file ser-go32.c.

Referenced by dos_open().

◆ IER_ERLS

#define IER_ERLS   0x4 /* int on line status change */

Definition at line 60 of file ser-go32.c.

Referenced by dos_open().

◆ IER_ERXRDY

#define IER_ERXRDY   0x1 /* int on rx ready */

Definition at line 58 of file ser-go32.c.

Referenced by dos_open().

◆ IER_ETXRDY

#define IER_ETXRDY   0x2 /* int on tx ready */

Definition at line 59 of file ser-go32.c.

Referenced by dos_open().

◆ IIR_FIFO_MASK

#define IIR_FIFO_MASK   0xc0 /* set if FIFOs are enabled */

Definition at line 64 of file ser-go32.c.

Referenced by dos_open().

◆ IIR_IMASK

#define IIR_IMASK   0xf /* interrupt cause mask */

Definition at line 65 of file ser-go32.c.

Referenced by dos_comisr().

◆ IIR_MLSC

#define IIR_MLSC   0x0 /* modem status */

Definition at line 71 of file ser-go32.c.

Referenced by dos_comisr().

◆ IIR_NOPEND

#define IIR_NOPEND   0x1 /* nothing pending */

Definition at line 66 of file ser-go32.c.

Referenced by dos_comisr().

◆ IIR_RLS

#define IIR_RLS   0x6 /* receive line status */

Definition at line 67 of file ser-go32.c.

Referenced by dos_comisr().

◆ IIR_RXRDY

#define IIR_RXRDY   0x4 /* receive ready */

Definition at line 68 of file ser-go32.c.

Referenced by dos_comisr().

◆ IIR_RXTOUT

#define IIR_RXTOUT   0xc /* receive timeout */

Definition at line 69 of file ser-go32.c.

Referenced by dos_comisr().

◆ IIR_TXRDY

#define IIR_TXRDY   0x2 /* transmit ready */

Definition at line 70 of file ser-go32.c.

Referenced by dos_comisr().

◆ inb

#define inb ( p,
a )   inportb((p)->base + (a))

Definition at line 236 of file ser-go32.c.

Referenced by dos_comisr(), dos_open(), dos_sendbreak(), dos_setbaudrate(), and dos_setstopbits().

◆ ISR

#define ISR ( x)    static void ISRNAME(x)(void) {dos_comisr(x);}

Definition at line 352 of file ser-go32.c.

◆ ISRNAME

#define ISRNAME ( x)    dos_comisr##x

Definition at line 351 of file ser-go32.c.

Referenced by ISR().

◆ LSR_BI

#define LSR_BI   0x10 /* break detected */

Definition at line 109 of file ser-go32.c.

Referenced by dos_comisr().

◆ LSR_FE

#define LSR_FE   0x08 /* framing error */

Definition at line 110 of file ser-go32.c.

Referenced by dos_comisr().

◆ LSR_OE

#define LSR_OE   0x02 /* overrun error */

Definition at line 112 of file ser-go32.c.

Referenced by dos_comisr().

◆ LSR_PE

#define LSR_PE   0x04 /* parity error */

Definition at line 111 of file ser-go32.c.

Referenced by dos_comisr().

◆ LSR_RCV_FIFO

#define LSR_RCV_FIFO   0x80 /* error in receive fifo */

Definition at line 106 of file ser-go32.c.

◆ LSR_RCV_MASK

#define LSR_RCV_MASK   0x1f

Definition at line 114 of file ser-go32.c.

◆ LSR_RXRDY

#define LSR_RXRDY   0x01 /* receiver ready */

Definition at line 113 of file ser-go32.c.

Referenced by dos_comisr().

◆ LSR_TSRE

#define LSR_TSRE   0x40 /* transmitter empty */

Definition at line 107 of file ser-go32.c.

◆ LSR_TXRDY

#define LSR_TXRDY   0x20 /* transmitter ready */

Definition at line 108 of file ser-go32.c.

◆ MCR_DRS

#define MCR_DRS   0x04 /* output 1 = xxx */

Definition at line 101 of file ser-go32.c.

◆ MCR_DTR

#define MCR_DTR   0x01 /* enable DTR */

Definition at line 103 of file ser-go32.c.

Referenced by dos_open().

◆ MCR_IENABLE

#define MCR_IENABLE   0x08 /* output 2 = int enable */

Definition at line 100 of file ser-go32.c.

Referenced by dos_open().

◆ MCR_LOOPBACK

#define MCR_LOOPBACK   0x10 /* loopback */

Definition at line 99 of file ser-go32.c.

◆ MCR_RTS

#define MCR_RTS   0x02 /* enable RTS */

Definition at line 102 of file ser-go32.c.

Referenced by dos_open().

◆ MSR_CTS

#define MSR_CTS   0x10

Definition at line 120 of file ser-go32.c.

◆ MSR_DCD

#define MSR_DCD   0x80

Definition at line 117 of file ser-go32.c.

◆ MSR_DCTS

#define MSR_DCTS   0x01

Definition at line 124 of file ser-go32.c.

◆ MSR_DDCD

#define MSR_DDCD   0x08

Definition at line 121 of file ser-go32.c.

◆ MSR_DDSR

#define MSR_DDSR   0x02

Definition at line 123 of file ser-go32.c.

◆ MSR_DSR

#define MSR_DSR   0x20

Definition at line 119 of file ser-go32.c.

◆ MSR_RI

#define MSR_RI   0x40

Definition at line 118 of file ser-go32.c.

◆ MSR_TERI

#define MSR_TERI   0x04

Definition at line 122 of file ser-go32.c.

◆ NINTR

#define NINTR   8

Definition at line 174 of file ser-go32.c.

Referenced by dos_hookirq().

◆ outb

#define outb ( p,
a,
v )   outportb((p)->base + (a), (v))

◆ RAWHZ

#define RAWHZ   18

Definition at line 138 of file ser-go32.c.

Referenced by dos_readchar(), dos_sendbreak(), and dos_write().

◆ SPEED_TOLERANCE

#define SPEED_TOLERANCE   30 /* thousandths; real == desired +- 3.0% */

Definition at line 55 of file ser-go32.c.

Referenced by dos_baudconv().

Typedef Documentation

◆ u_long

typedef unsigned long u_long

Definition at line 130 of file ser-go32.c.

Function Documentation

◆ _initialize_ser_dos()

void _initialize_ser_dos ( )

◆ dos_baudconv()

static int dos_baudconv ( int rate)
static

Definition at line 713 of file ser-go32.c.

References COMTICK, divrnd, err, rate, and SPEED_TOLERANCE.

Referenced by dos_open(), and dos_setbaudrate().

◆ dos_close()

static void dos_close ( struct serial * scb)
static

◆ dos_comisr()

static void dos_comisr ( int irq)
static

◆ dos_copy_tty_state()

static serial_ttystate dos_copy_tty_state ( struct serial * scb,
serial_ttystate ttystate )
static

Definition at line 671 of file ser-go32.c.

◆ dos_drain_output()

static int dos_drain_output ( struct serial * scb)
static

Definition at line 615 of file ser-go32.c.

◆ dos_flush_input()

static int dos_flush_input ( struct serial * scb)
static

◆ dos_flush_output()

static int dos_flush_output ( struct serial * scb)
static

Definition at line 599 of file ser-go32.c.

◆ dos_get_tty_state()

static serial_ttystate dos_get_tty_state ( struct serial * scb)
static

Definition at line 647 of file ser-go32.c.

References serial::fd, ports, and dos_ttystate::refcnt.

◆ dos_getc()

static int dos_getc ( volatile struct dos_ttystate * port)
static

◆ dos_hookirq()

static struct intrupt * dos_hookirq ( unsigned int irq)
static

◆ dos_open()

static int dos_open ( struct serial * scb,
const char * name )
static

◆ dos_print_tty_state()

static void dos_print_tty_state ( struct serial * scb,
serial_ttystate ttystate,
struct ui_file * stream )
static

Definition at line 705 of file ser-go32.c.

◆ dos_putc()

static int dos_putc ( int c,
struct dos_ttystate * port )
static

Definition at line 260 of file ser-go32.c.

References CBSIZE, dos_ttystate::cbuf, dos_ttystate::count, dos_ttystate::first, and intrupt::port.

Referenced by dos_comisr().

◆ dos_raw()

static void dos_raw ( struct serial * scb)
static

Definition at line 621 of file ser-go32.c.

◆ dos_readchar()

static int dos_readchar ( struct serial * scb,
int timeout )
static

Definition at line 627 of file ser-go32.c.

References dos_getc(), serial::fd, ports, QUIT, RAWHZ, and SERIAL_TIMEOUT.

◆ dos_sendbreak()

static int dos_sendbreak ( struct serial * scb)
static

Definition at line 839 of file ser-go32.c.

References CFCR_SBREAK, com_cfcr, serial::fd, inb, outb, ports, and RAWHZ.

◆ dos_set_tty_state()

static int dos_set_tty_state ( struct serial * scb,
serial_ttystate state )
static

Definition at line 682 of file ser-go32.c.

References dos_ttystate::baudrate, and dos_setbaudrate().

◆ dos_setbaudrate()

static int dos_setbaudrate ( struct serial * scb,
int rate )
static

◆ dos_setparity()

static int dos_setparity ( struct serial * scb,
int parity )
static

Definition at line 607 of file ser-go32.c.

◆ dos_setstopbits()

static int dos_setstopbits ( struct serial * scb,
int num )
static

◆ dos_unhookirq()

static void dos_unhookirq ( struct intrupt * intr)
static

◆ dos_write()

static int dos_write ( struct serial * scb,
const void * buf,
size_t count )
static

◆ gdb_pipe()

int gdb_pipe ( int pdes[2])

Definition at line 882 of file ser-go32.c.

Referenced by serial_pipe().

◆ info_serial_command()

static void info_serial_command ( const char * arg,
int from_tty )
static

◆ ISR()

ISR ( 0 )

Definition at line 354 of file ser-go32.c.

References ISRNAME.

Variable Documentation

◆ dos_ops

const struct serial_ops dos_ops
static
Initial value:
=
{
"hardwire",
NULL,
(void (*)(struct serial *, int))NULL
}
static int dos_setstopbits(struct serial *scb, int num)
Definition ser-go32.c:768
static int dos_set_tty_state(struct serial *scb, serial_ttystate state)
Definition ser-go32.c:682
static int dos_flush_input(struct serial *scb)
Definition ser-go32.c:692
static int dos_open(struct serial *scb, const char *name)
Definition ser-go32.c:451
static void dos_print_tty_state(struct serial *scb, serial_ttystate ttystate, struct ui_file *stream)
Definition ser-go32.c:705
static int dos_drain_output(struct serial *scb)
Definition ser-go32.c:615
static serial_ttystate dos_copy_tty_state(struct serial *scb, serial_ttystate ttystate)
Definition ser-go32.c:671
static int dos_sendbreak(struct serial *scb)
Definition ser-go32.c:839
static int dos_flush_output(struct serial *scb)
Definition ser-go32.c:599
static serial_ttystate dos_get_tty_state(struct serial *scb)
Definition ser-go32.c:647
static void dos_raw(struct serial *scb)
Definition ser-go32.c:621
static int dos_write(struct serial *scb, const void *buf, size_t count)
Definition ser-go32.c:795
static int dos_setparity(struct serial *scb, int parity)
Definition ser-go32.c:607
static int dos_setbaudrate(struct serial *scb, int rate)
Definition ser-go32.c:736
static void dos_close(struct serial *scb)
Definition ser-go32.c:556
static int dos_readchar(struct serial *scb, int timeout)
Definition ser-go32.c:627

Definition at line 858 of file ser-go32.c.

Referenced by _initialize_ser_dos().

◆ icu_oldmask

unsigned char icu_oldmask

Definition at line 171 of file ser-go32.c.

Referenced by _initialize_ser_dos(), and dos_unhookirq().

◆ intrupts

struct intrupt intrupts[NINTR]
static

◆ ports

struct dos_ttystate ports[4]
static
Initial value:
=
{
{
COM1ADDR, 4, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
}
,
{
COM2ADDR, 3, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
}
,
{
COM3ADDR, 4, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
}
,
{
COM4ADDR, 3, 0, NULL, 0, 0, "", 0, 0, 0, 0, 0, 0, 0, 0
}
}
#define COM3ADDR
Definition ser-go32.c:33
#define COM1ADDR
Definition ser-go32.c:31
#define COM4ADDR
Definition ser-go32.c:34
#define COM2ADDR
Definition ser-go32.c:32

Referenced by _initialize_ser_dos(), dos_close(), dos_flush_input(), dos_get_tty_state(), dos_open(), dos_readchar(), dos_sendbreak(), dos_setbaudrate(), dos_setstopbits(), dos_write(), and info_serial_command().