Dr Andrew Scott G7VAV

My photo
 
May 2024
Mo Tu We Th Fr Sa Su
29 30 1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31 1 2
3 4 5 6 7 8 9


lp.h
001: #ifndef _LINUX_LP_H
002: #define _LINUX_LP_H
003: 
004: /*
005:  * usr/include/linux/lp.h c.1991-1992 James Wiegand
006:  * many modifications copyright (C) 1992 Michael K. Johnson
007:  * Interrupt support added 1993 Nigel Gamble
008:  * Removed 8255 status defines from inside __KERNEL__ Marcelo Tosatti 
009:  */
010: 
011: /*
012:  * Per POSIX guidelines, this module reserves the LP and lp prefixes
013:  * These are the lp_table[minor].flags flags...
014:  */
015: #define LP_EXIST 0x0001
016: #define LP_SELEC 0x0002
017: #define LP_BUSY  0x0004
018: #define LP_BUSY_BIT_POS 2
019: #define LP_OFFL  0x0008
020: #define LP_NOPA  0x0010
021: #define LP_ERR   0x0020
022: #define LP_ABORT 0x0040
023: #define LP_CAREFUL 0x0080 /* obsoleted -arca */
024: #define LP_ABORTOPEN 0x0100
025: 
026: #define LP_TRUST_IRQ_  0x0200 /* obsolete */
027: #define LP_NO_REVERSE  0x0400 /* No reverse mode available. */
028: #define LP_DATA_AVAIL  0x0800 /* Data is available. */
029: 
030: /* 
031:  * bit defines for 8255 status port
032:  * base + 1
033:  * accessed with LP_S(minor), which gets the byte...
034:  */
035: #define LP_PBUSY        0x80  /* inverted input, active high */
036: #define LP_PACK         0x40  /* unchanged input, active low */
037: #define LP_POUTPA       0x20  /* unchanged input, active high */
038: #define LP_PSELECD      0x10  /* unchanged input, active high */
039: #define LP_PERRORP      0x08  /* unchanged input, active low */
040: 
041: /* timeout for each character.  This is relative to bus cycles -- it
042:  * is the count in a busy loop.  THIS IS THE VALUE TO CHANGE if you
043:  * have extremely slow printing, or if the machine seems to slow down
044:  * a lot when you print.  If you have slow printing, increase this
045:  * number and recompile, and if your system gets bogged down, decrease
046:  * this number.  This can be changed with the tunelp(8) command as well.
047:  */
048: 
049: #define LP_INIT_CHAR 1000
050: 
051: /* The parallel port specs apparently say that there needs to be
052:  * a .5usec wait before and after the strobe.
053:  */
054: 
055: #define LP_INIT_WAIT 1
056: 
057: /* This is the amount of time that the driver waits for the printer to
058:  * catch up when the printer's buffer appears to be filled.  If you
059:  * want to tune this and have a fast printer (i.e. HPIIIP), decrease
060:  * this number, and if you have a slow printer, increase this number.
061:  * This is in hundredths of a second, the default 2 being .05 second.
062:  * Or use the tunelp(8) command, which is especially nice if you want
063:  * change back and forth between character and graphics printing, which
064:  * are wildly different...
065:  */
066: 
067: #define LP_INIT_TIME 2
068: 
069: /* IOCTL numbers */
070: #define LPCHAR   0x0601  /* corresponds to LP_INIT_CHAR */
071: #define LPTIME   0x0602  /* corresponds to LP_INIT_TIME */
072: #define LPABORT  0x0604  /* call with TRUE arg to abort on error,
073:                             FALSE to retry.  Default is retry.  */
074: #define LPSETIRQ 0x0605  /* call with new IRQ number,
075:                             or 0 for polling (no IRQ) */
076: #define LPGETIRQ 0x0606  /* get the current IRQ number */
077: #define LPWAIT   0x0608  /* corresponds to LP_INIT_WAIT */
078: /* NOTE: LPCAREFUL is obsoleted and it' s always the default right now -arca */
079: #define LPCAREFUL   0x0609  /* call with TRUE arg to require out-of-paper, off-
080:                             line, and error indicators good on all writes,
081:                             FALSE to ignore them.  Default is ignore. */
082: #define LPABORTOPEN 0x060a  /* call with TRUE arg to abort open() on error,
083:                             FALSE to ignore error.  Default is ignore.  */
084: #define LPGETSTATUS 0x060b  /* return LP_S(minor) */
085: #define LPRESET     0x060c  /* reset printer */
086: #ifdef LP_STATS
087: #define LPGETSTATS  0x060d  /* get statistics (struct lp_stats) */
088: #endif
089: #define LPGETFLAGS  0x060e  /* get status flags */
090: #define LPSETTIMEOUT 0x060f /* set parport timeout */
091: 
092: /* timeout for printk'ing a timeout, in jiffies (100ths of a second).
093:    This is also used for re-checking error conditions if LP_ABORT is
094:    not set.  This is the default behavior. */
095: 
096: #define LP_TIMEOUT_INTERRUPT    (60 * HZ)
097: #define LP_TIMEOUT_POLLED       (10 * HZ)
098: 
099: 
100: #endif
101: 


for client 3.137.181.52
© Andrew Scott 2006 - 2024,
All Rights Reserved
http://www.andrew-scott.uk/
Andrew Scott
http://www.andrew-scott.co.uk/