usbPrinter.h
上传用户:luoyougen
上传日期:2008-05-12
资源大小:23136k
文件大小:1k
源码类别:

VxWorks

开发平台:

C/C++

  1. /* usbPrinter.h - Class-specific definitions for USB printers */
  2. /* Copyright 2000 Wind River Systems, Inc. */
  3. /*
  4. Modification history
  5. --------------------
  6. 01a,,rcb  First.
  7. */
  8. #ifndef __INCusbPrinterh
  9. #define __INCusbPrinterh
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. /* defines */
  14. /* USB PRINTER subclass codes */
  15. #define USB_SUBCLASS_PRINTER 0x01
  16. /* USB PRINTER protocol codes */
  17. #define USB_PROTOCOL_PRINTER_UNIDIR 0x01
  18. #define USB_PROTOCOL_PRINTER_BIDIR 0x02
  19. /* USB PRINTER class-specific requests */
  20. #define USB_REQ_PRN_GET_DEVICE_ID 0x00
  21. #define USB_REQ_PRN_GET_PORT_STATUS 0x01
  22. #define USB_REQ_PRN_SOFT_RESET 0x02
  23. /* USB_PRINTER_PORT_STATUS.status bit definitions */
  24. #define USB_PRN_STS_PAPER_EMPTY  0x20
  25. #define USB_PRN_STS_SELECTED 0x10
  26. #define USB_PRN_STS_NOT_ERROR 0x08
  27. #define USB_PRN_MAX_DEVICE_ID_LEN   256
  28. /* typedefs */
  29. /* USB_PRINTER_CAPABILITIES
  30.  *
  31.  * NOTE: The USB_PRINTER_CAPABILITIES structure matches that of the IEEE-1284
  32.  * "device ID" string.
  33.  */
  34. typedef struct usb_printer_capabilities
  35.     {
  36.     UINT16 length;     /* length of string, big-endian */
  37.     UINT8 caps [1];     /* variable length string */
  38.     } USB_PRINTER_CAPABILITIES, *pUSB_PRINTER_CAPABILITIES;
  39. /* USB_PRINTER_PORT_STATUS */
  40. typedef struct usb_printer_port_status
  41.     {
  42.     UINT8 status;
  43.     } USB_PRINTER_PORT_STATUS, *pUSB_PRINTER_PORT_STATUS;
  44. #ifdef __cplusplus
  45. }
  46. #endif
  47. #endif /* __INCusbPrinterh */
  48. /* End of file. */