xref: /onnv-gate/usr/src/uts/common/sys/usb/clients/printer/usb_printer.h (revision 7492:2387323b838f)
10Sstevel@tonic-gate /*
20Sstevel@tonic-gate  * CDDL HEADER START
30Sstevel@tonic-gate  *
40Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7492SZhigang.Lu@Sun.COM  * Common Development and Distribution License (the "License").
6*7492SZhigang.Lu@Sun.COM  * You may not use this file except in compliance with the License.
70Sstevel@tonic-gate  *
80Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
90Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
100Sstevel@tonic-gate  * See the License for the specific language governing permissions
110Sstevel@tonic-gate  * and limitations under the License.
120Sstevel@tonic-gate  *
130Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
140Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
150Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
160Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
170Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
180Sstevel@tonic-gate  *
190Sstevel@tonic-gate  * CDDL HEADER END
200Sstevel@tonic-gate  */
210Sstevel@tonic-gate /*
22*7492SZhigang.Lu@Sun.COM  * Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
23*7492SZhigang.Lu@Sun.COM  * Use is subject to license terms.
240Sstevel@tonic-gate  */
250Sstevel@tonic-gate 
260Sstevel@tonic-gate #ifndef _SYS_USB_PRINTER_H
270Sstevel@tonic-gate #define	_SYS_USB_PRINTER_H
280Sstevel@tonic-gate 
290Sstevel@tonic-gate 
300Sstevel@tonic-gate #ifdef	__cplusplus
310Sstevel@tonic-gate extern "C" {
320Sstevel@tonic-gate #endif
330Sstevel@tonic-gate 
340Sstevel@tonic-gate /*
350Sstevel@tonic-gate  * This header file contains generic printer class spec (1.0) information
360Sstevel@tonic-gate  */
370Sstevel@tonic-gate 
380Sstevel@tonic-gate /*
390Sstevel@tonic-gate  * Printer class descriptor type
400Sstevel@tonic-gate  */
410Sstevel@tonic-gate #define	USB_PRINTER_DESCR_TYPE	0x21
420Sstevel@tonic-gate 
430Sstevel@tonic-gate 
440Sstevel@tonic-gate /*
450Sstevel@tonic-gate  * Printer class specific commands sent to the device
460Sstevel@tonic-gate  */
470Sstevel@tonic-gate #define	USB_PRINTER_GET_DEVICE_ID	0x00 /* Get IEEE-1284 compatible ID */
480Sstevel@tonic-gate #define	USB_PRINTER_GET_PORT_STATUS	0x01 /* Returns current status */
490Sstevel@tonic-gate 					/* Flushes buffers of Bulk out pipe */
500Sstevel@tonic-gate #define	USB_PRINTER_SOFT_RESET		0x02
510Sstevel@tonic-gate #define	USB_PRINTER_CLEAR_FEATURE	0x01	/* Clear a stall */
520Sstevel@tonic-gate 
530Sstevel@tonic-gate /*
540Sstevel@tonic-gate  * Port status values, see Table 3 of the specification
550Sstevel@tonic-gate  */
560Sstevel@tonic-gate #define	USB_PRINTER_PORT_NO_ERROR	0x0008	/* No Error */
570Sstevel@tonic-gate #define	USB_PRINTER_PORT_NO_SELECT	0x0010	/* Selected */
580Sstevel@tonic-gate #define	USB_PRINTER_PORT_EMPTY		0x0020	/* Paper Empty */
590Sstevel@tonic-gate 
600Sstevel@tonic-gate /*
610Sstevel@tonic-gate  * Application error state
620Sstevel@tonic-gate  */
630Sstevel@tonic-gate #define	USB_PRINTER_ERR_ERR		0x0001	/* Error */
640Sstevel@tonic-gate #define	USB_PRINTER_SLCT_ERR		0x0002	/* Selected */
650Sstevel@tonic-gate #define	USB_PRINTER_PE_ERR		0x0004	/* Paper Empty */
660Sstevel@tonic-gate 
670Sstevel@tonic-gate #ifdef __cplusplus
680Sstevel@tonic-gate }
690Sstevel@tonic-gate #endif
700Sstevel@tonic-gate 
710Sstevel@tonic-gate #endif	/* _SYS_USB_PRINTER_H */
72