1 /* 2 * CDDL HEADER START 3 * 4 * The contents of this file are subject to the terms of the 5 * Common Development and Distribution License (the "License"). 6 * You may not use this file except in compliance with the License. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 9 * or http://www.opensolaris.org/os/licensing. 10 * See the License for the specific language governing permissions 11 * and limitations under the License. 12 * 13 * When distributing Covered Code, include this CDDL HEADER in each 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 15 * If applicable, add the following below this CDDL HEADER, with the 16 * fields enclosed by brackets "[]" replaced with your own identifying 17 * information: Portions Copyright [yyyy] [name of copyright owner] 18 * 19 * CDDL HEADER END 20 */ 21 /* 22 * Copyright 2008 Sun Microsystems, Inc. All rights reserved. 23 * Use is subject to license terms. 24 */ 25 26 #ifndef _SYS_USB_PRINTER_H 27 #define _SYS_USB_PRINTER_H 28 29 30 #ifdef __cplusplus 31 extern "C" { 32 #endif 33 34 /* 35 * This header file contains generic printer class spec (1.0) information 36 */ 37 38 /* 39 * Printer class descriptor type 40 */ 41 #define USB_PRINTER_DESCR_TYPE 0x21 42 43 44 /* 45 * Printer class specific commands sent to the device 46 */ 47 #define USB_PRINTER_GET_DEVICE_ID 0x00 /* Get IEEE-1284 compatible ID */ 48 #define USB_PRINTER_GET_PORT_STATUS 0x01 /* Returns current status */ 49 /* Flushes buffers of Bulk out pipe */ 50 #define USB_PRINTER_SOFT_RESET 0x02 51 #define USB_PRINTER_CLEAR_FEATURE 0x01 /* Clear a stall */ 52 53 /* 54 * Port status values, see Table 3 of the specification 55 */ 56 #define USB_PRINTER_PORT_NO_ERROR 0x0008 /* No Error */ 57 #define USB_PRINTER_PORT_NO_SELECT 0x0010 /* Selected */ 58 #define USB_PRINTER_PORT_EMPTY 0x0020 /* Paper Empty */ 59 60 /* 61 * Application error state 62 */ 63 #define USB_PRINTER_ERR_ERR 0x0001 /* Error */ 64 #define USB_PRINTER_SLCT_ERR 0x0002 /* Selected */ 65 #define USB_PRINTER_PE_ERR 0x0004 /* Paper Empty */ 66 67 #ifdef __cplusplus 68 } 69 #endif 70 71 #endif /* _SYS_USB_PRINTER_H */ 72