CI: Build on Arch (bleeding-ege) and Ubuntu (stable) AVR-GCC toolchains.
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Host / HIDClassHost.h
index c629927..fd6ead4 100644 (file)
@@ -1,13 +1,13 @@
 /*
              LUFA Library
-     Copyright (C) Dean Camera, 2012.
+     Copyright (C) Dean Camera, 2018.
 
   dean [at] fourwalledcubicle [dot] com
            www.lufa-lib.org
 */
 
 /*
-  Copyright 2011  Dean Camera (dean [at] fourwalledcubicle [dot] com)
+  Copyright 2018  Dean Camera (dean [at] fourwalledcubicle [dot] com)
 
   Permission to use, copy, modify, distribute, and sell this
   software and its documentation for any purpose is hereby granted
@@ -18,7 +18,7 @@
   advertising or publicity pertaining to distribution of the
   software without specific, written prior permission.
 
-  The author disclaim all warranties with regard to this
+  The author disclaims all warranties with regard to this
   software, including all implied warranties of merchantability
   and fitness.  In no event shall the author be liable for any
   special, indirect or consequential damages or any damages
 /** \ingroup Group_USBClassHID
  *  \defgroup Group_USBClassHIDHost HID Class Host Mode Driver
  *
- *  \section Sec_Dependencies Module Source Dependencies
+ *  \section Sec_USBClassHIDHost_Dependencies Module Source Dependencies
  *  The following files must be built with any user project that uses this module:
  *    - LUFA/Drivers/USB/Class/Host/HIDClassHost.c <i>(Makefile source module name: LUFA_SRC_USBCLASS)</i>
  *
- *  \section Sec_ModDescription Module Description
+ *  \section Sec_USBClassHIDHost_ModDescription Module Description
  *  Host Mode USB Class driver framework interface, for the HID USB Class driver.
  *
  *  @{
                         */
                        typedef struct
                        {
-                               const struct
+                               struct
                                {
-                                       uint8_t  DataINPipeNumber; /**< Pipe number of the HID interface's IN data pipe. */
-                                       bool     DataINPipeDoubleBank; /**< Indicates if the HID interface's IN data pipe should use double banking. */
-
-                                       uint8_t  DataOUTPipeNumber; /**< Pipe number of the HID interface's OUT data pipe. */
-                                       bool     DataOUTPipeDoubleBank; /**< Indicates if the HID interface's OUT data pipe should use double banking. */
+                                       USB_Pipe_Table_t DataINPipe; /**< Data IN Pipe configuration table. */
+                                       USB_Pipe_Table_t DataOUTPipe; /**< Data OUT Pipe configuration table. */
 
                                        uint8_t  HIDInterfaceProtocol; /**< HID interface protocol value to match against if a specific
                                                                        *   boot subclass protocol is required, a protocol value from the
@@ -96,9 +93,9 @@
                                        #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)
                                        HID_ReportInfo_t* HIDParserData; /**< HID parser data to store the parsed HID report data, when boot protocol
                                                                          *   is not used.
-                                                                                                         *
+                                                                         *
                                                                          *  \note When the \c HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined,
-                                                                         *        this method is unavailable.
+                                                                         *        this field is unavailable.
                                                                          */
                                        #endif
                                } Config; /**< Config data for the USB class interface within the device. All elements in this section
                                                        */
                                        uint8_t InterfaceNumber; /**< Interface index of the HID interface within the attached device. */
 
-                                       uint16_t DataINPipeSize; /**< Size in bytes of the HID interface's IN data pipe. */
-                                       uint16_t DataOUTPipeSize;  /**< Size in bytes of the HID interface's OUT data pipe. */
-
                                        bool SupportsBootProtocol; /**< Indicates if the current interface instance supports the HID Boot
                                                                    *   Protocol when enabled via \ref HID_Host_SetBootProtocol().
                                                                    */
 
                                        uint8_t LargestReportSize; /**< Largest report the device will send, in bytes. */
                                } State; /**< State data for the USB class interface within the device. All elements in this section
-                                                 *   <b>may</b> be set to initial values, but may also be ignored to default to sane values when
-                                                 *   the interface is enumerated.
-                                                 */
+                                         *   <b>may</b> be set to initial values, but may also be ignored to default to sane values when
+                                         *   the interface is enumerated.
+                                         */
                        } USB_ClassInfo_HID_Host_t;
 
                /* Enums: */
                         *  device. This should be called once after the stack has enumerated the attached device, while the host state
                         *  machine is in the Addressed state.
                         *
-                        *  \note Once the device pipes are configured, the HID device's reporting protocol <b>must</b> be set via a call
-                        *        to either the \ref HID_Host_SetBootProtocol() or \ref HID_Host_SetReportProtocol() function.
+                        *  \attention Once the device pipes are configured, the HID device's reporting protocol <b>must</b> be set via a call
+                        *             to either the \ref HID_Host_SetBootProtocol() or \ref HID_Host_SetReportProtocol() function.
                         *
                         *  \param[in,out] HIDInterfaceInfo      Pointer to a structure containing a HID Class host configuration and state.
                         *  \param[in]     ConfigDescriptorSize  Length of the attached device's Configuration Descriptor.
                         *  \pre This function must only be called when the Host state machine is in the \ref HOST_STATE_Configured state or the
                         *       call will fail.
                         *
-                        *  \note The destination buffer should be large enough to accommodate the largest report that the attached device
-                        *        can generate.
+                        *  \attention The destination buffer should be large enough to accommodate the largest report that the attached device
+                        *             can generate.
                         *
                         *  \param[in,out] HIDInterfaceInfo  Pointer to a structure containing a HID Class host configuration and state.
                         *  \param[in]     Buffer            Buffer to store the received report into.
                        uint8_t HID_Host_SetBootProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);
 
                        /** Sets the idle period for the attached HID device to the specified interval. The HID idle period determines the rate
-                        *  at which the device should send a report, when no state changes have ocurred; i.e. on HID keyboards, this sets the
+                        *  at which the device should send a report, when no state changes have occurred; i.e. on HID keyboards, this sets the
                         *  hardware key repeat interval.
                         *
                         *  \param[in,out] HIDInterfaceInfo  Pointer to a structure containing a HID Class host configuration and state.
                        /** Switches the attached HID device's reporting protocol over to the standard Report protocol mode. This also retrieves
                         *  and parses the device's HID report descriptor, so that the size of each report can be determined in advance.
                         *
-                        *  \note Whether this function is used or not, the \ref CALLBACK_HIDParser_FilterHIDReportItem() callback from the HID
-                        *        Report Parser this function references <b>must</b> be implemented in the user code.
-                        *        \n\n
+                        *  \attention Whether this function is used or not, the \ref CALLBACK_HIDParser_FilterHIDReportItem() callback from the HID
+                        *             Report Parser this function references <b>must</b> be implemented in the user code.
                         *
                         *  \note When the \c HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, this method is unavailable.
                         *