1*0Sstevel@tonic-gate /* 2*0Sstevel@tonic-gate * CDDL HEADER START 3*0Sstevel@tonic-gate * 4*0Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*0Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*0Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*0Sstevel@tonic-gate * with the License. 8*0Sstevel@tonic-gate * 9*0Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*0Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*0Sstevel@tonic-gate * See the License for the specific language governing permissions 12*0Sstevel@tonic-gate * and limitations under the License. 13*0Sstevel@tonic-gate * 14*0Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*0Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*0Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*0Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*0Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*0Sstevel@tonic-gate * 20*0Sstevel@tonic-gate * CDDL HEADER END 21*0Sstevel@tonic-gate */ 22*0Sstevel@tonic-gate /* 23*0Sstevel@tonic-gate * Copyright (c) 1995,2001 by Sun Microsystems, Inc. 24*0Sstevel@tonic-gate * All rights reserved. 25*0Sstevel@tonic-gate */ 26*0Sstevel@tonic-gate 27*0Sstevel@tonic-gate #ifndef _PCSER_CONF_H 28*0Sstevel@tonic-gate #define _PCSER_CONF_H 29*0Sstevel@tonic-gate 30*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*0Sstevel@tonic-gate 32*0Sstevel@tonic-gate #ifdef __cplusplus 33*0Sstevel@tonic-gate extern "C" { 34*0Sstevel@tonic-gate #endif 35*0Sstevel@tonic-gate 36*0Sstevel@tonic-gate /* 37*0Sstevel@tonic-gate * pcserconf.h - misc stuff 38*0Sstevel@tonic-gate */ 39*0Sstevel@tonic-gate 40*0Sstevel@tonic-gate #ifdef ZIP 41*0Sstevel@tonic-gate /* 42*0Sstevel@tonic-gate * default setting for the serial lines 43*0Sstevel@tonic-gate */ 44*0Sstevel@tonic-gate static struct pcser_defaults_t pcser_initmodes = { 45*0Sstevel@tonic-gate /* flags */ 46*0Sstevel@tonic-gate SDFLAGS, 47*0Sstevel@tonic-gate /* drain_size */ 48*0Sstevel@tonic-gate PCSER_DRAIN_BSIZE, 49*0Sstevel@tonic-gate /* pcser_hiwater */ 50*0Sstevel@tonic-gate PCSER_HIWATER, 51*0Sstevel@tonic-gate /* pcser_lowwater */ 52*0Sstevel@tonic-gate PCSER_LOWWATER, 53*0Sstevel@tonic-gate /* rtpr */ 54*0Sstevel@tonic-gate PCSER_RTPR, 55*0Sstevel@tonic-gate /* rx_fifo_thld */ 56*0Sstevel@tonic-gate RX_FIFO_SIZE, 57*0Sstevel@tonic-gate /* struct termios */ 58*0Sstevel@tonic-gate { 59*0Sstevel@tonic-gate BRKINT|ICRNL|IXON|ISTRIP, /* iflag */ 60*0Sstevel@tonic-gate OPOST|ONLCR|XTABS, /* oflag */ 61*0Sstevel@tonic-gate CFLAGS|TX_BAUD, /* cflag */ 62*0Sstevel@tonic-gate ISIG|ICANON|ECHO, /* lflag */ 63*0Sstevel@tonic-gate { /* cc[NCCS] */ 64*0Sstevel@tonic-gate CINTR, CQUIT, CERASE, CKILL, 65*0Sstevel@tonic-gate CEOF, CEOL, CEOL2, CSWTCH, 66*0Sstevel@tonic-gate CSTART, CSTOP, CSUSP, CDSUSP, 67*0Sstevel@tonic-gate CRPRNT, CFLUSH, CWERASE, CLNEXT, 68*0Sstevel@tonic-gate }, 69*0Sstevel@tonic-gate }, 70*0Sstevel@tonic-gate }; 71*0Sstevel@tonic-gate #endif /* ZIP */ 72*0Sstevel@tonic-gate 73*0Sstevel@tonic-gate /* 74*0Sstevel@tonic-gate * baud rate conversion table - note that for speeds that we don't 75*0Sstevel@tonic-gate * support, the table entry is 0 76*0Sstevel@tonic-gate */ 77*0Sstevel@tonic-gate unsigned short pcser_baud_table[PCSER_MAX_SPEEDS] = { 78*0Sstevel@tonic-gate 0x00000, /* B0 (hangup line, not really a speed) */ 79*0Sstevel@tonic-gate 0x00900, /* B50 */ 80*0Sstevel@tonic-gate 0x00600, /* B75 */ 81*0Sstevel@tonic-gate 0x00417, /* B110 */ 82*0Sstevel@tonic-gate 0x00359, /* B134 */ 83*0Sstevel@tonic-gate 0x00300, /* B150 */ 84*0Sstevel@tonic-gate 0x00240, /* B200 */ 85*0Sstevel@tonic-gate 0x00180, /* B300 */ 86*0Sstevel@tonic-gate 0x000c0, /* B600 */ 87*0Sstevel@tonic-gate 0x00060, /* B1200 */ 88*0Sstevel@tonic-gate 0x00040, /* B1800 */ 89*0Sstevel@tonic-gate 0x00030, /* B2400 */ 90*0Sstevel@tonic-gate 0x00018, /* B4800 */ 91*0Sstevel@tonic-gate 0x0000c, /* B9600 */ 92*0Sstevel@tonic-gate 0x00006, /* B19200 */ 93*0Sstevel@tonic-gate 0x00003, /* B38400 */ 94*0Sstevel@tonic-gate 0x00002, /* B57600 */ 95*0Sstevel@tonic-gate 0x00000, /* B76800 */ 96*0Sstevel@tonic-gate 0x00001, /* B115200 */ 97*0Sstevel@tonic-gate 0x00000, /* B153600 */ 98*0Sstevel@tonic-gate 0x00000, /* B230400 */ 99*0Sstevel@tonic-gate 0x00000, /* B307200 */ 100*0Sstevel@tonic-gate 0x00000, /* B460800 */ 101*0Sstevel@tonic-gate }; 102*0Sstevel@tonic-gate 103*0Sstevel@tonic-gate /* 104*0Sstevel@tonic-gate * ioctl debugging stuff 105*0Sstevel@tonic-gate */ 106*0Sstevel@tonic-gate #ifdef DEBUG_PCSERIOCTL 107*0Sstevel@tonic-gate 108*0Sstevel@tonic-gate struct ioc_txt_t { 109*0Sstevel@tonic-gate char *name; 110*0Sstevel@tonic-gate int ioc_cmd; 111*0Sstevel@tonic-gate }; 112*0Sstevel@tonic-gate 113*0Sstevel@tonic-gate struct ioc_txt_t ioc_txt[] = { 114*0Sstevel@tonic-gate { "TCSBRK", TCSBRK }, 115*0Sstevel@tonic-gate { "TCSETSW", TCSETSW }, 116*0Sstevel@tonic-gate { "TCSETSF", TCSETSF }, 117*0Sstevel@tonic-gate { "TCSETAW", TCSETAW }, 118*0Sstevel@tonic-gate { "TCSETAF", TCSETAF }, 119*0Sstevel@tonic-gate { "TIOCSBRK", TIOCSBRK }, 120*0Sstevel@tonic-gate { "TIOCCBRK", TIOCCBRK }, 121*0Sstevel@tonic-gate { "TCGETA", TCGETA }, 122*0Sstevel@tonic-gate { "TCSETA", TCSETA }, 123*0Sstevel@tonic-gate { "TCSETAW", TCSETAW }, 124*0Sstevel@tonic-gate { "TCSETAF", TCSETAF }, 125*0Sstevel@tonic-gate { "TCXONC", TCXONC }, 126*0Sstevel@tonic-gate { "TCFLSH", TCFLSH }, 127*0Sstevel@tonic-gate { "TIOCKBON", TIOCKBON }, 128*0Sstevel@tonic-gate { "TIOCKBOF", TIOCKBOF }, 129*0Sstevel@tonic-gate { "KBENABLED", KBENABLED }, 130*0Sstevel@tonic-gate { "TCDSET", TCDSET }, 131*0Sstevel@tonic-gate { "RTS_TOG", RTS_TOG }, 132*0Sstevel@tonic-gate { "TIOCGWINSZ", TIOCGWINSZ }, 133*0Sstevel@tonic-gate { "TIOCSWINSZ", TIOCSWINSZ }, 134*0Sstevel@tonic-gate { "TIOCGSOFTCAR", TIOCGSOFTCAR }, 135*0Sstevel@tonic-gate { "TIOCSSOFTCAR", TIOCSSOFTCAR }, 136*0Sstevel@tonic-gate { "TCGETS", TCGETS }, 137*0Sstevel@tonic-gate { "TCSETS", TCSETS }, 138*0Sstevel@tonic-gate { "TCSANOW", TCSANOW }, 139*0Sstevel@tonic-gate { "TCSADRAIN", TCSADRAIN }, 140*0Sstevel@tonic-gate { "TCSAFLUSH", TCSAFLUSH }, 141*0Sstevel@tonic-gate { "STGET", STGET }, 142*0Sstevel@tonic-gate { "STSET", STSET }, 143*0Sstevel@tonic-gate { "STTHROW", STTHROW }, 144*0Sstevel@tonic-gate { "STWLINE", STWLINE }, 145*0Sstevel@tonic-gate { "STTSV", STTSV }, 146*0Sstevel@tonic-gate { "TCGETX", TCGETX }, 147*0Sstevel@tonic-gate { "TCSETX", TCSETX }, 148*0Sstevel@tonic-gate { "TCSETXW", TCSETXW }, 149*0Sstevel@tonic-gate { "TCSETXF", TCSETXF }, 150*0Sstevel@tonic-gate { "TIOCMSET", TIOCMSET }, 151*0Sstevel@tonic-gate { "TIOCMBIS", TIOCMBIS }, 152*0Sstevel@tonic-gate { "TIOCMBIC", TIOCMBIC }, 153*0Sstevel@tonic-gate { "TIOCMGET", TIOCMGET }, 154*0Sstevel@tonic-gate { "TIOCFLUSH", TIOCFLUSH }, 155*0Sstevel@tonic-gate { "TIOCCDTR", TIOCCDTR }, 156*0Sstevel@tonic-gate { "TIOCSDTR", TIOCSDTR }, 157*0Sstevel@tonic-gate { (char *)NULL, 0 } 158*0Sstevel@tonic-gate }; 159*0Sstevel@tonic-gate #endif /* DEBUG_PCSERIOCTL */ 160*0Sstevel@tonic-gate 161*0Sstevel@tonic-gate #ifdef __cplusplus 162*0Sstevel@tonic-gate } 163*0Sstevel@tonic-gate #endif 164*0Sstevel@tonic-gate 165*0Sstevel@tonic-gate #endif /* _PCSER_CONF_H */ 166