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 <tim@cyberelk.demon.co.uk>
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 */
15
16 #define PP_MAJOR 99
17
18 #define PP_IOCTL 'p'
19
20 /* Set mode for read/write (e.g. IEEE1284_MODE_EPP) */
21 #define PPSETMODE _IOW(PP_IOCTL, 0x80, int)
22
23 /* Read status */
24 #define PPRSTATUS _IOR(PP_IOCTL, 0x81, unsigned char)
25 #define PPWSTATUS OBSOLETE__IOW(PP_IOCTL, 0x82, unsigned char)
26
27 /* Read/write control */
28 #define PPRCONTROL _IOR(PP_IOCTL, 0x83, unsigned char)
29 #define PPWCONTROL _IOW(PP_IOCTL, 0x84, unsigned char)
30
31 struct ppdev_frob_struct {
32 unsigned char mask;
33 unsigned char val;
34 };
35 #define PPFCONTROL _IOW(PP_IOCTL, 0x8e, struct ppdev_frob_struct)
36
37 /* Read/write data */
38 #define PPRDATA _IOR(PP_IOCTL, 0x85, unsigned char)
39 #define PPWDATA _IOW(PP_IOCTL, 0x86, unsigned char)
40
41 /* Read/write econtrol (not used) */
42 #define PPRECONTROL OBSOLETE__IOR(PP_IOCTL, 0x87, unsigned char)
43 #define PPWECONTROL OBSOLETE__IOW(PP_IOCTL, 0x88, unsigned char)
44
45 /* Read/write FIFO (not used) */
46 #define PPRFIFO OBSOLETE__IOR(PP_IOCTL, 0x89, unsigned char)
47 #define PPWFIFO OBSOLETE__IOW(PP_IOCTL, 0x8a, unsigned char)
48
49 /* Claim the port to start using it */
50 #define PPCLAIM _IO(PP_IOCTL, 0x8b)
51
52 /* Release the port when you aren't using it */
53 #define PPRELEASE _IO(PP_IOCTL, 0x8c)
54
55 /* Yield the port (release it if another driver is waiting,
56 * then reclaim) */
57 #define PPYIELD _IO(PP_IOCTL, 0x8d)
58
59 /* Register device exclusively (must be before PPCLAIM). */
60 #define PPEXCL _IO(PP_IOCTL, 0x8f)
61
62 /* Data line direction: non-zero for input mode. */
63 #define PPDATADIR _IOW(PP_IOCTL, 0x90, int)
64
65 /* Negotiate a particular IEEE 1284 mode. */
66 #define PPNEGOT _IOW(PP_IOCTL, 0x91, int)
67
68 /* Set control lines when an interrupt occurs. */
69 #define PPWCTLONIRQ _IOW(PP_IOCTL, 0x92, unsigned char)
70
71 /* Clear (and return) interrupt count. */
72 #define PPCLRIRQ _IOR(PP_IOCTL, 0x93, int)
73
74 /* Set the IEEE 1284 phase that we're in (e.g. IEEE1284_PH_FWD_IDLE) */
75 #define PPSETPHASE _IOW(PP_IOCTL, 0x94, int)
76
77 /* Set and get port timeout (struct timeval's) */
78 #define PPGETTIME _IOR(PP_IOCTL, 0x95, struct timeval)
79 #define PPSETTIME _IOW(PP_IOCTL, 0x96, struct timeval)
80
81
82
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.