/*
SIOPORT.C -- Do not compile this file directly. It is #included by
Z80SIO01+ in order to use the same COMM_PORT decalration in all Z80 SIO
examples.
*/
UARTZ80SIO uz80 = {
AST + 9, /* offset of clock reg. from base */
AST + 0XF, /* offset of interrupt id. register */
X16, /* reference clock speed */
{0,0,0,0,0,0,0,0} /* UART virtual write register array */
};
UART u2; /* the UART union */
COMM_PORT z80 = {
NULL, /* ptr. to start of receive buffer */
NULL, /* ptr. to next available slot in buff */
NULL, /* ptr. to next slot emptied from buff */
NULL, /* ptr. to end of receive buffer */
NULL, /* ptr. to start of TX buffer */
NULL, /* ptr. to next available slot in buff */
NULL, /* ptr. to next slot emptied from buff */
NULL, /* ptr. to end of TX buffer */
{NULL, NULL, NULL, NULL}, /* ptr. to interrupt handlers */
RUNTIME, /* inhold */
/* FLOW CONTROL LARGE DATA (LD) = 52, SMALL DATA (SD) = 30 */
FALSE, /* flag <=> one or more controls on */
FALSE, /* flag <=> high level flow cntrl. on */
DC1, /* XON char (when XON/XOFF enabled) */
DC3, /* XOFF char (when XON/XOFF enabled) */
RUNTIME, /* flow ctl. high water mark */
RUNTIME, /* flow ctl. low water mark */
/* UART SPECIFICS */
AST+3, /* base address of 8250 UART (0)*/
/* RS-232 INPUTS LD= 70, SD = 46 */
RUNTIME, /* format 7:DCD, 6:RI, 5: DSR, 4:CTS */
RUNTIME, /* TX interrupt handler primed */
RUNTIME, /* TX interrupt handler busy */
{0}, /* address of uart structure */
Z80SIO, /* type of UART */
uz80_init, /* init function */
AST+1, /* offset of data port from base CHB (0)*/
uz80_rxstat, /* UART receiver status register */
uz80_txstat, /* UART transmitter status register */
uz80_read, /* pointer to received data read fn. */
uz80_write, /* pointer to transmited data send fn. */
NULL, /* address of modem structure */
conoutc, /* local console output function */
NULL, /* printer output */
NULL, /* buffer output */
NULL, /* fn. to restart TX */
/* LINE FORMAT */
DATABITS8, /* RX databits (default) */
DATABITS8, /* TX databits */
PARITY_NONE, /* startup parity */
STOPBITS1, /* startup number of stopbits */
2400L, /* startup baud rate */
/* RS-232 OUTPUTS */
HIGH, /* DTR startup status */
HIGH, /* RTS startup status */
LOW, /* GPO1 startup status */
LOW, /* GPO2 startup status */
/* INTERRUPT-SPECIFIC MEMBERS */
/* RECEIVE */
IRQ2_VECTOR, /* interrupt request line (or NULL) */
2048, /* size (in bytes) of receive buffer */
2, /* IRQ line */
/* TRANSMIT */
IRQ2_VECTOR, /* interrupt request line (or EOF) */
1024, /* size (in bytes) of TX buffer */
/* RECEIVE DATA FORMAT SPECIFICS */
FALSE, /* flag for input cooked/raw mode */
NULL, /* pointer to array of translation chars*/
FALSE, /* flag for input end-of-line processing*/
FALSE, /* convert case (UPPER, LOWER, NORMAL) */
FALSE, /* ASCII chars only (0-127) */
40, /* time to wait for a byte (ms.) */
0, /* time to wait after last byte (ms.) */
/* TRANSMITTED DATA TRANSFORMATION SPECIFICS */
FALSE, /* flag for output cooked/raw mode */
NULL, /* pointer to array of translation chars*/
FALSE, /* output end-of-line processing */
FALSE, /* convert case (UPPER, LOWER, NORMAL) */
FALSE, /* ASCII chars. only (0-127) */
0, /* interbyte delay */
0, /* delay imposed by delay character */
'~', /* char. that imposes delay */
FALSE, /* length of interline delay */
LF, /* interline delay character */
RUNTIME, /* Echo flag, bit-encoded. */
ESCAPE, /* abort key for XON/XOFF loops */
};