/* @(#)lpcmd.h 1.3 86/11/21 SMI */ /* * Copyright (c) 1986 by Sun Microsystems, Inc. */ #ifndef ←IOCTL← #include <sys/ioctl.h> #endif /* * There are three generic-type ioctls: */ #define LPCOMMAND ←IOW(v, 3, int) /* see commands, below */ #define LPSETVERSATEC ←IO(v,4) /* use the versatec port */ #define LPSETCENTRONICS ←IO(v,5) /* use the centronics port */ /* * The following are all generic commands that may be passed with the * LPCOMMAND ioctl. Not all printer drivers necessarily support all * of these commands (in fact, they probably don't support a lot of * them). However, these should be all the commands a parallel * printer should ever want (we'll see). They are converted into * the real commands in the drivers through a table. * * First, the latched register commands. These are all soft * bits - not the same bit positions as any hardware. This first * set of commands will be remembered and the port will stay in the * requested state until explicitly changed via another ioctl. For * every * mode to be put in, there is an opposite ioctl to take it out. * EXCEPTION: It can be in both LPC←VPLT and LPC←VSPP mode * simultaneously (but not at the same time as LPC←PRNT). Got that? */ #define LPC←LRST 0x00001 /* assert option INPUT PRIME- signal */ #define LPC←DRST 0x00002 /* deassert option INPUT PRIME- signal */ #define LPC←SOPT 0x00004 /* select option port */ #define LPC←SVPT 0x00008 /* select versatec */ #define LPC←DSTR 0x00010 /* enable datastreaming */ #define LPC←DDST 0x00020 /* disable datastreaming */ #define LPC←VSPP 0x00040 /* enable Versatec spp mode */ #define LPC←DSPP 0x00080 /* disable Versatec spp mode */ #define LPC←VPLT 0x00100 /* enable Versatec plot mode */ #define LPC←DVPT 0x00200 /* disable Versatec plot mode */ #define LPC←PRNT 0x00400 /* normal Versatec print mode */ #define LPC←LATCHMASK 0x00777 /* all of the latched bits */ #define LPC←PRINTMASK 0x007c0 /* just the print mode bits */ /* * Next comes the commands that are just sent out once and then * forgotten about. These are known as the PULSED register commands * on the VMEbus IKON board. (Once again, these are just soft * bits - they don't match the same hard bits in any registers * on any board). */ #define LPC←SACK 0x00800 /* software ack */ #define LPC←MCLR 0x01000 /* master clear */ #define LPC←VCLR 0x02000 /* Versatec clear */ #define LPC←VTFF 0x04000 /* Versatec form feed */ #define LPC←VEOT 0x08000 /* Versatec EOT */ #define LPC←VLTR 0x10000 /* Versatec line terminate */ #define LPC←PULSEMASK 0x1f800 /* just the pulsed bits */ #define LPC←ALLVALID 0x1ffff /* all valid command bits */