| 1 | |
| 2 | * linux/drivers/char/ppdev.h
|
| 3 | *
|
| 4 | * User-space parallel port device driver (header file).
|
| 5 | *
|
| 6 | * Copyright (C) 1998-9 Tim Waugh <[email protected]>
|
| 7 | *
|
| 8 | * This program is free software; you can redistribute it and/or
|
| 9 | * modify it under the terms of the GNU General Public License
|
| 10 | * as published by the Free Software Foundation; either version
|
| 11 | * 2 of the License, or (at your option) any later version.
|
| 12 | *
|
| 13 | * Added PPGETTIME/PPSETTIME, Fred Barnes, 1999
|
| 14 | * Added PPGETMODES/PPGETMODE/PPGETPHASE, Fred Barnes <[email protected]>, 03/01/2001
|
| 15 |
|
| 16 |
|
| 17 | #define PP_MAJOR 99
|
| 18 |
|
| 19 | #define PP_IOCTL 'p'
|
| 20 |
|
| 21 |
|
| 22 | #define PPSETMODE _IOW(PP_IOCTL, 0x80, int)
|
| 23 |
|
| 24 |
|
| 25 | #define PPRSTATUS _IOR(PP_IOCTL, 0x81, unsigned char)
|
| 26 | #define PPWSTATUS OBSOLETE__IOW(PP_IOCTL, 0x82, unsigned char)
|
| 27 |
|
| 28 |
|
| 29 | #define PPRCONTROL _IOR(PP_IOCTL, 0x83, unsigned char)
|
| 30 | #define PPWCONTROL _IOW(PP_IOCTL, 0x84, unsigned char)
|
| 31 |
|
| 32 | struct ppdev_frob_struct {
|
| 33 | unsigned char mask;
|
| 34 | unsigned char val;
|
| 35 | };
|
| 36 | #define PPFCONTROL _IOW(PP_IOCTL, 0x8e, struct ppdev_frob_struct)
|
| 37 |
|
| 38 |
|
| 39 | #define PPRDATA _IOR(PP_IOCTL, 0x85, unsigned char)
|
| 40 | #define PPWDATA _IOW(PP_IOCTL, 0x86, unsigned char)
|
| 41 |
|
| 42 |
|
| 43 | #define PPRECONTROL OBSOLETE__IOR(PP_IOCTL, 0x87, unsigned char)
|
| 44 | #define PPWECONTROL OBSOLETE__IOW(PP_IOCTL, 0x88, unsigned char)
|
| 45 |
|
| 46 |
|
| 47 | #define PPRFIFO OBSOLETE__IOR(PP_IOCTL, 0x89, unsigned char)
|
| 48 | #define PPWFIFO OBSOLETE__IOW(PP_IOCTL, 0x8a, unsigned char)
|
| 49 |
|
| 50 |
|
| 51 | #define PPCLAIM _IO(PP_IOCTL, 0x8b)
|
| 52 |
|
| 53 |
|
| 54 | #define PPRELEASE _IO(PP_IOCTL, 0x8c)
|
| 55 |
|
| 56 | |
| 57 | * then reclaim)
|
| 58 | #define PPYIELD _IO(PP_IOCTL, 0x8d)
|
| 59 |
|
| 60 |
|
| 61 | #define PPEXCL _IO(PP_IOCTL, 0x8f)
|
| 62 |
|
| 63 |
|
| 64 | #define PPDATADIR _IOW(PP_IOCTL, 0x90, int)
|
| 65 |
|
| 66 |
|
| 67 | #define PPNEGOT _IOW(PP_IOCTL, 0x91, int)
|
| 68 |
|
| 69 |
|
| 70 | #define PPWCTLONIRQ _IOW(PP_IOCTL, 0x92, unsigned char)
|
| 71 |
|
| 72 |
|
| 73 | #define PPCLRIRQ _IOR(PP_IOCTL, 0x93, int)
|
| 74 |
|
| 75 |
|
| 76 | #define PPSETPHASE _IOW(PP_IOCTL, 0x94, int)
|
| 77 |
|
| 78 |
|
| 79 | #define PPGETTIME _IOR(PP_IOCTL, 0x95, struct timeval)
|
| 80 | #define PPSETTIME _IOW(PP_IOCTL, 0x96, struct timeval)
|
| 81 |
|
| 82 |
|
| 83 | #define PPGETMODES _IOR(PP_IOCTL, 0x97, unsigned int)
|
| 84 |
|
| 85 |
|
| 86 | #define PPGETMODE _IOR(PP_IOCTL, 0x98, int)
|
| 87 | #define PPGETPHASE _IOR(PP_IOCTL, 0x99, int)
|
| 88 |
|
| 89 |
|
| 90 | #define PPGETFLAGS _IOR(PP_IOCTL, 0x9a, int)
|
| 91 | #define PPSETFLAGS _IOW(PP_IOCTL, 0x9b, int)
|
| 92 |
|
| 93 |
|
| 94 | #define PP_FASTWRITE (1<<2)
|
| 95 | #define PP_FASTREAD (1<<3)
|
| 96 | #define PP_W91284PIC (1<<4)
|
| 97 |
|
| 98 |
|
| 99 | #define PP_FLAGMASK (PP_FASTWRITE | PP_FASTREAD | PP_W91284PIC)
|
| 100 |
|
| 101 |
|