/* IBM_PROLOG_BEGIN_TAG                                                   */
/* This is an automatically generated prolog.                             */
/*                                                                        */
/* bos720 src/bos/kernext/usb/common/hidClass.h 1.1                       */
/*                                                                        */
/* Licensed Materials - Property of IBM                                   */
/*                                                                        */
/* Restricted Materials of IBM                                            */
/*                                                                        */
/* COPYRIGHT International Business Machines Corp. 2004                   */
/* All Rights Reserved                                                    */
/*                                                                        */
/* US Government Users Restricted Rights - Use, duplication or            */
/* disclosure restricted by GSA ADP Schedule Contract with IBM Corp.      */
/*                                                                        */
/* IBM_PROLOG_END_TAG                                                     */

#ifndef _H_HIDCLASS
#define _H_HIDCLASS

#include <sys/types.h>

/*
 * Refer to Universal Serial Bus HID Specification for
 * information concerning the items in this header file
 *
 */

/* class descriptor                                                         */
typedef struct _HIDDesc     {

  fld8_t      blength;
  fld8_t      bDescriptorType;
#define USB_DT_HID             0x21
  fld16_t     bcdHID;
  fld8_t      bCountryCode;
  fld8_t      bNumDescriptors;
  struct _HIDtypes{
    fld8_t      bType;
    fld16_t     wLength;
  } types[1];
} HIDDesc, *PHIDDesc;

/* bRequest field                                                           */
#define USB_HID_GET_REPORT     1
#define USB_HID_GET_IDLE       2
#define USB_HID_GET_PROTOCOL   3
#define USB_HID_SET_REPORT     9
#define USB_HID_SET_IDLE       10
#define USB_HID_SET_PROTOCOL   11

/* protocols                                                                */
#define USB_HID_BOOT_PROTOCOL  0
#define USB_HID_HID_PROTOCOL   1

/* report types                                                             */
#define USB_HID_RPT_INPUT      1
#define USB_HID_RPT_OUTPUT     2
#define USB_HID_RPT_FEATURE    3

/* class descriptor types                                                   */
#define USB_HID_CLASS_RPT      0x22        /* report descriptor             */
#define USB_HID_CLASS_PHY      0x23        /* physical descriptor           */

#endif /* _H_HIDCLASS  */
