X-Git-Url: http://git.linex4red.de/pub/USBasp.git/blobdiff_plain/7f9f97c792dee6875fbca9806422bdd7d6c5a657..d11ed10c5314c44dc01c06954d1d73d4894cbff8:/LUFA/Drivers/USB/Class/Host/HID.h diff --git a/LUFA/Drivers/USB/Class/Host/HID.h b/LUFA/Drivers/USB/Class/Host/HID.h index 01174c536..3aaf809fd 100644 --- a/LUFA/Drivers/USB/Class/Host/HID.h +++ b/LUFA/Drivers/USB/Class/Host/HID.h @@ -130,14 +130,6 @@ }; /* Function Prototypes: */ - /** General management task for a given Human Interface Class host class interface, required for the correct operation of - * the interface. This should be called frequently in the main program loop, before the master USB management task - * \ref USB_USBTask(). - * - * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state - */ - void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); - /** Host interface configuration routine, to configure a given HID host interface instance using the Configuration * Descriptor read from an attached USB device. This function automatically updates the given HID Host instance's * state values and configures the pipes required to communicate with the interface if it is found within the @@ -159,6 +151,9 @@ /** Receives a HID IN report from the attached HID device, when a report has been received on the HID IN Data pipe. * + * \note This function must only be called when the Host state machine is in the 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. * @@ -173,6 +168,9 @@ #if !defined(HID_HOST_BOOT_PROTOCOL_ONLY) /** Receives a HID IN report from the attached device, by the report ID. * + * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * call will fail. + * * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, this method is unavailable. * * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state @@ -188,6 +186,9 @@ /** Sends an OUT report to the currently attached HID device, using the device's OUT pipe if available or the device's * Control pipe if not. * + * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * call will fail. + * * \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, the ReportID parameter is removed * from the parameter list of this function. * @@ -212,6 +213,9 @@ /** Determines if a HID IN report has been received from the attached device on the data IN pipe. * + * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the + * call will fail. + * * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state * * \return Boolean true if a report has been received, false otherwise @@ -249,6 +253,19 @@ uint8_t HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1); #endif + /* Inline Functions: */ + /** General management task for a given Human Interface Class host class interface, required for the correct operation of + * the interface. This should be called frequently in the main program loop, before the master USB management task + * \ref USB_USBTask(). + * + * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state + */ + static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo); + static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) + { + (void)HIDInterfaceInfo; + } + /* Private Interface - For use in library only: */ #if !defined(__DOXYGEN__) /* Macros: */