|
|
1.1 ! root 1: /* (-lgl ! 2: * COHERENT Driver Kit Version 1.1.0 ! 3: * Copyright (c) 1982, 1990 by Mark Williams Company. ! 4: * All rights reserved. May not be copied without permission. ! 5: -lgl) */ ! 6: /* ! 7: * poll_clk.h - include file for drivers using altclk_in()/altclk_out() ! 8: * ! 9: * $Log: poll_clk.h,v $ ! 10: * Revision 1.4 91/12/10 07:57:01 hal ! 11: * Add uart_type and has_irq usage fields. ! 12: * Change in_use from boolean (:1) to short. ! 13: * ! 14: * Revision 1.3 91/11/14 14:11:13 hal ! 15: * Re-entrancy fix. Make com_usage bit field. ! 16: * ! 17: * Revision 1.2 91/06/04 14:36:10 hal ! 18: * Imports are from support.c. ! 19: * ! 20: * Revision 1.1 91/06/04 14:34:49 hal ! 21: * Initial version - imported from tty.c. ! 22: * ! 23: */ ! 24: ! 25: #ifndef POLL_CLK_H ! 26: #define POLL_CLK_H ! 27: ! 28: /* ! 29: * bit fields in com_usage[0..3] ! 30: * in_use is incremented each time open is attempted, and decremented ! 31: * when the open fails or the corresponding close completes ! 32: * irq is true when the port is in use (open or hanging) with interrupts ! 33: * has_irq is true when the irq vector for the port is usable; ! 34: * it is not ok to enable interrupts until this goes true! ! 35: * poll is true when the port is open for polling ! 36: * hcls is true while the port is doing last close ! 37: * ohlt is true while CTS flow control halts output ! 38: */ ! 39: typedef struct { ! 40: short uart_type; /* see US_* in ins8250.h */ ! 41: short in_use; ! 42: int irq:1; ! 43: int has_irq:1; ! 44: int poll:1; ! 45: int hcls:1; ! 46: int ohlt:1; ! 47: } com_usage_t; ! 48: ! 49: /* bits in poll_owner - at most one will be set at a time */ ! 50: #define POLL_AL 1 ! 51: #define POLL_HS 2 ! 52: ! 53: /* ! 54: * The following variables are defined in support.c ! 55: * ! 56: * "poll_rate" is the polling rate in HZ, 0 if no polling being done ! 57: * "poll_owner" is a bit array so only one driver at a time can ! 58: * use an alternate clock routine ! 59: * "com_usage" is used only by al0/al1 drivers ! 60: */ ! 61: extern com_usage_t com_usage[]; /* COM_UNUSED/COM_IRQ/COM_POLLED */ ! 62: extern int poll_rate; /* used by "prate" command */ ! 63: extern int poll_owner; /* checked during *open() of port */ ! 64: #endif
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.