Add host mode USB Class driver stubs, add beginnings of a CDC host class driver.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Device / HID.h
index 1269a52..a4317d7 100644 (file)
   this software.\r
 */\r
 \r
-/** \ingroup Group_USBDeviceClassDrivers\r
- *  @defgroup Group_USBClassHIDDevice HID Device Class Driver - LUFA/Drivers/Class/Device/HID.h\r
- *\r
- *  \section Sec_Dependencies Module Source Dependencies\r
- *  The following files must be built with any user project that uses this module:\r
- *    - LUFA/Drivers/USB/Class/Device/HID.c\r
+/** \ingroup Group_USBClassHID\r
+ *  @defgroup Group_USBClassHIDDevice HID Class Device Mode Driver\r
  *\r
  *  \section Module Description\r
- *  Functions, macros, variables, enums and types related to the management of USB HID Class interfaces\r
- *  within a USB device.\r
+ *  Device Mode USB Class driver framework interface, for the HID USB Class driver.\r
  *\r
  *  @{\r
  */\r
  \r
-#ifndef _HID_CLASS_H_\r
-#define _HID_CLASS_H_\r
+#ifndef _HID_CLASS_DEVICE_H_\r
+#define _HID_CLASS_DEVICE_H_\r
 \r
        /* Includes: */\r
                #include "../../USB.h"\r
+               #include "../Common/HID.h"\r
 \r
                #include <string.h>\r
 \r
                        extern "C" {\r
                #endif\r
 \r
-       /* Macros: */\r
-               /** HID Class Specific Request to get the current HID report from the device. */\r
-               #define REQ_GetReport      0x01\r
-\r
-               /** HID Class Specific Request to get the current device idle count. */\r
-               #define REQ_GetIdle        0x02\r
-\r
-               /** HID Class Specific Request to set the current HID report to the device. */\r
-               #define REQ_SetReport      0x09\r
-\r
-               /** HID Class Specific Request to set the device's idle count. */\r
-               #define REQ_SetIdle        0x0A\r
-\r
-               /** HID Class Specific Request to get the current HID report protocol mode. */\r
-               #define REQ_GetProtocol    0x03\r
-\r
-               /** HID Class Specific Request to set the current HID report protocol mode. */\r
-               #define REQ_SetProtocol    0x0B\r
-\r
-               /** Descriptor header type value, to indicate a HID class HID descriptor. */\r
-               #define DTYPE_HID          0x21\r
-               \r
-               /** Descriptor header type value, to indicate a HID class HID report descriptor. */\r
-               #define DTYPE_Report       0x22\r
-\r
-       /* Type Defines: */\r
-               /** Type define for the HID class specific HID descriptor, to describe the HID device's specifications. Refer to the HID\r
-                *  specification for details on the structure elements.\r
-                */\r
-               typedef struct\r
-               {\r
-                       USB_Descriptor_Header_t               Header;\r
-                               \r
-                       uint16_t                              HIDSpec;\r
-                       uint8_t                               CountryCode;\r
-               \r
-                       uint8_t                               TotalReportDescriptors;\r
-\r
-                       uint8_t                               HIDReportType;\r
-                       uint16_t                              HIDReportLength;\r
-               } USB_Descriptor_HID_t;\r
-\r
-               /** Type define for the data type used to store HID report descriptor elements. */\r
-               typedef uint8_t USB_Descriptor_HIDReport_Datatype_t;\r
-\r
-               /** Class state structure. An instance of this structure should be made for each HID interface\r
-                *  within the user application, and passed to each of the HID class driver functions as the\r
-                *  HIDInterfaceInfo parameter. The contents of this structure should be set to their correct\r
-                *  values when used, or ommitted to force the library to use default values.\r
-                *\r
-                *  Note that for the HID class driver, host-to-device reports are received via HID class requests\r
-                *  rather than a dedicated endpoint to simplify the driver and its interface.\r
-                */\r
-               typedef struct\r
-               {\r
-                       uint8_t  InterfaceNumber; /**< Interface number of the HID interface within the device */\r
-\r
-                       uint8_t  ReportINEndpointNumber; /**< Endpoint number of the HID interface's IN report endpoint */\r
-                       uint16_t ReportINEndpointSize; /**< Size in bytes of the HID interface's IN report endpoint */\r
-                       \r
-                       uint8_t  ReportINBufferSize; /**< Size of the largest possible report to send to the host, for buffer allocation purposes */\r
-\r
-                       bool     UsingReportProtocol; /**< Indicates if the HID interface is set to Boot or Report protocol mode */\r
-                       uint16_t IdleCount; /**< Report idle period, in ms, set by the host */\r
-                       uint16_t IdleMSRemaining; /**< Total number of ms remaining before the idle period elapses */\r
-               } USB_ClassInfo_HID_t;\r
-\r
        /* Function Prototypes: */\r
                /** Configures the endpoints of a given HID interface, ready for use. This should be linked to the library\r
                 *  \ref EVENT_USB_ConfigurationChanged() event so that the endpoints are configured when the configuration\r