3      Copyright (C) Dean Camera, 2009. 
   5   dean [at] fourwalledcubicle [dot] com 
   6       www.fourwalledcubicle.com 
  10   Copyright 2009  Dean Camera (dean [at] fourwalledcubicle [dot] com) 
  12   Permission to use, copy, modify, and distribute this software 
  13   and its documentation for any purpose and without fee is hereby 
  14   granted, provided that the above copyright notice appear in all 
  15   copies and that both that the copyright notice and this 
  16   permission notice and warranty disclaimer appear in supporting 
  17   documentation, and that the name of the author not be used in 
  18   advertising or publicity pertaining to distribution of the 
  19   software without specific, written prior permission. 
  21   The author disclaim all warranties with regard to this 
  22   software, including all implied warranties of merchantability 
  23   and fitness.  In no event shall the author be liable for any 
  24   special, indirect or consequential damages or any damages 
  25   whatsoever resulting from loss of use, data or profits, whether 
  26   in an action of contract, negligence or other tortious action, 
  27   arising out of or in connection with the use or performance of 
  31 /** \ingroup Group_USBClassHID 
  35 #ifndef _HID_CLASS_COMMON_H_ 
  36 #define _HID_CLASS_COMMON_H_ 
  39                 #include "../../USB.h" 
  44                 /** HID Class Specific Request to get the current HID report from the device. */ 
  45                 #define REQ_GetReport      0x01 
  47                 /** HID Class Specific Request to get the current device idle count. */ 
  48                 #define REQ_GetIdle        0x02 
  50                 /** HID Class Specific Request to set the current HID report to the device. */ 
  51                 #define REQ_SetReport      0x09 
  53                 /** HID Class Specific Request to set the device's idle count. */ 
  54                 #define REQ_SetIdle        0x0A 
  56                 /** HID Class Specific Request to get the current HID report protocol mode. */ 
  57                 #define REQ_GetProtocol    0x03 
  59                 /** HID Class Specific Request to set the current HID report protocol mode. */ 
  60                 #define REQ_SetProtocol    0x0B 
  62                 /** Descriptor header type value, to indicate a HID class HID descriptor. */ 
  63                 #define DTYPE_HID          0x21 
  65                 /** Descriptor header type value, to indicate a HID class HID report descriptor. */ 
  66                 #define DTYPE_Report       0x22 
  69                 /** Type define for the HID class specific HID descriptor, to describe the HID device's specifications. Refer to the HID 
  70                  *  specification for details on the structure elements. 
  74                         USB_Descriptor_Header_t  Header
; 
  79                         uint8_t                  TotalReportDescriptors
; 
  81                         uint8_t                  HIDReportType
; 
  82                         uint16_t                 HIDReportLength
; 
  83                 } USB_Descriptor_HID_t
; 
  85                 /** Type define for the data type used to store HID report descriptor elements. */ 
  86                 typedef uint8_t USB_Descriptor_HIDReport_Datatype_t
;