linux/include/uapi/linux/lp.h

/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 * usr/include/linux/lp.h c.1991-1992 James Wiegand
 * many modifications copyright (C) 1992 Michael K. Johnson
 * Interrupt support added 1993 Nigel Gamble
 * Removed 8255 status defines from inside __KERNEL__ Marcelo Tosatti 
 */
#ifndef _UAPI_LINUX_LP_H
#define _UAPI_LINUX_LP_H

#include <linux/types.h>
#include <linux/ioctl.h>

/*
 * Per POSIX guidelines, this module reserves the LP and lp prefixes
 * These are the lp_table[minor].flags flags...
 */
#define LP_EXIST
#define LP_SELEC
#define LP_BUSY
#define LP_BUSY_BIT_POS
#define LP_OFFL
#define LP_NOPA
#define LP_ERR
#define LP_ABORT
#define LP_CAREFUL
#define LP_ABORTOPEN

#define LP_TRUST_IRQ_
#define LP_NO_REVERSE
#define LP_DATA_AVAIL

/* 
 * bit defines for 8255 status port
 * base + 1
 * accessed with LP_S(minor), which gets the byte...
 */
#define LP_PBUSY
#define LP_PACK
#define LP_POUTPA
#define LP_PSELECD
#define LP_PERRORP

/* timeout for each character.  This is relative to bus cycles -- it
 * is the count in a busy loop.  THIS IS THE VALUE TO CHANGE if you
 * have extremely slow printing, or if the machine seems to slow down
 * a lot when you print.  If you have slow printing, increase this
 * number and recompile, and if your system gets bogged down, decrease
 * this number.  This can be changed with the tunelp(8) command as well.
 */

#define LP_INIT_CHAR

/* The parallel port specs apparently say that there needs to be
 * a .5usec wait before and after the strobe.
 */

#define LP_INIT_WAIT

/* This is the amount of time that the driver waits for the printer to
 * catch up when the printer's buffer appears to be filled.  If you
 * want to tune this and have a fast printer (i.e. HPIIIP), decrease
 * this number, and if you have a slow printer, increase this number.
 * This is in hundredths of a second, the default 2 being .05 second.
 * Or use the tunelp(8) command, which is especially nice if you want
 * change back and forth between character and graphics printing, which
 * are wildly different...
 */

#define LP_INIT_TIME

/* IOCTL numbers */
#define LPCHAR
#define LPTIME
#define LPABORT
#define LPSETIRQ
#define LPGETIRQ
#define LPWAIT
/* NOTE: LPCAREFUL is obsoleted and it' s always the default right now -arca */
#define LPCAREFUL
#define LPABORTOPEN
#define LPGETSTATUS
#define LPRESET
#ifdef LP_STATS
#define LPGETSTATS
#endif
#define LPGETFLAGS
#define LPSETTIMEOUT_OLD
#define LPSETTIMEOUT_NEW
#if __BITS_PER_LONG == 64
#define LPSETTIMEOUT
#else
#define LPSETTIMEOUT
#endif

/* timeout for printk'ing a timeout, in jiffies (100ths of a second).
   This is also used for re-checking error conditions if LP_ABORT is
   not set.  This is the default behavior. */

#define LP_TIMEOUT_INTERRUPT
#define LP_TIMEOUT_POLLED


#endif /* _UAPI_LINUX_LP_H */