16863 implement C23 stdbit.h
[illumos-gate.git] / usr / src / uts / common / sys / ecppsys.h
blobe871e42a8c5cd4e08f1056abb3dc8b8b3783cb70
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
20 * CDDL HEADER END
23 * Copyright (c) 1990-2000 by Sun Microsystems, Inc.
24 * All rights reserved.
27 #ifndef _SYS_ECPPSYS_H
28 #define _SYS_ECPPSYS_H
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
34 #define ECPPIOC_SETPARMS _IOW('p', 70, struct ecpp_transfer_parms)
35 #define ECPPIOC_GETPARMS _IOR('p', 71, struct ecpp_transfer_parms)
36 #define ECPPIOC_GETDEVID _IOWR('p', 73, struct ecpp_device_id)
38 /* current_mode values */
39 #define ECPP_CENTRONICS 0x01 /* non-1284 */
40 #define ECPP_COMPAT_MODE 0x02
41 #define ECPP_BYTE_MODE 0x03
42 #define ECPP_NIBBLE_MODE 0x04
43 #define ECPP_ECP_MODE 0x05
44 #define ECPP_FAILURE_MODE 0x06
45 #define ECPP_DIAG_MODE 0x07
46 #define ECPP_INIT_MODE 0x08
47 #define ECPP_EPP_MODE 0x09
49 typedef struct p1284_ioctl_st {
50 int array[10];
51 char *cptr;
52 char *name;
53 } P1284Ioctl;
55 struct ecpp_transfer_parms {
56 int write_timeout;
57 int mode;
61 * Structure for retrieving IEEE 1284 Device ID
63 struct ecpp_device_id {
64 int mode; /* mode to use for reading device id */
65 int len; /* length of buffer */
66 int rlen; /* actual length of device id string */
67 char *addr; /* buffer address */
68 #ifndef _LP64
69 int filler[2];
70 #endif
73 #ifdef _KERNEL
75 * 32bit support for ioctl
77 struct ecpp_device_id32 {
78 int mode; /* mode to use for reading device id */
79 int len; /* length of buffer */
80 int rlen; /* actual length of device id string */
81 caddr32_t addr; /* buffer address */
82 int filler[2];
84 #endif /* _KERNEL */
85 #ifdef __cplusplus
87 #endif
89 #endif /* _SYS_ECPPSYS_H */