/*\r
LUFA Library\r
- Copyright (C) Dean Camera, 2009.\r
+ Copyright (C) Dean Camera, 2010.\r
\r
dean [at] fourwalledcubicle [dot] com\r
www.fourwalledcubicle.com\r
*/\r
\r
/*\r
- Copyright 2009 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
+ Copyright 2010 Dean Camera (dean [at] fourwalledcubicle [dot] com)\r
\r
- Permission to use, copy, modify, and distribute this software\r
- and its documentation for any purpose and without fee is hereby\r
- granted, provided that the above copyright notice appear in all\r
- copies and that both that the copyright notice and this\r
- permission notice and warranty disclaimer appear in supporting\r
- documentation, and that the name of the author not be used in\r
- advertising or publicity pertaining to distribution of the\r
+ Permission to use, copy, modify, distribute, and sell this \r
+ software and its documentation for any purpose is hereby granted\r
+ without fee, provided that the above copyright notice appear in \r
+ all copies and that both that the copyright notice and this\r
+ permission notice and warranty disclaimer appear in supporting \r
+ documentation, and that the name of the author not be used in \r
+ advertising or publicity pertaining to distribution of the \r
software without specific, written prior permission.\r
\r
The author disclaim all warranties with regard to this\r
};\r
\r
/* Function Prototypes: */\r
- /** General management task for a given Human Interface Class host class interface, required for the correct operation of\r
- * the interface. This should be called frequently in the main program loop, before the master USB management task\r
- * \ref USB_USBTask().\r
- *\r
- * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state\r
- */\r
- void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
-\r
/** Host interface configuration routine, to configure a given HID host interface instance using the Configuration\r
* Descriptor read from an attached USB device. This function automatically updates the given HID Host instance's\r
* state values and configures the pipes required to communicate with the interface if it is found within the\r
\r
/** Receives a HID IN report from the attached HID device, when a report has been received on the HID IN Data pipe.\r
* \r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
* \note The destination buffer should be large enough to accommodate the largest report that the attached device\r
* can generate.\r
*\r
#if !defined(HID_HOST_BOOT_PROTOCOL_ONLY)\r
/** Receives a HID IN report from the attached device, by the report ID.\r
*\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
* \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, this method is unavailable.\r
*\r
* \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state\r
/** Sends an OUT report to the currently attached HID device, using the device's OUT pipe if available or the device's\r
* Control pipe if not.\r
*\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
* \note When the HID_HOST_BOOT_PROTOCOL_ONLY compile time token is defined, the ReportID parameter is removed\r
* from the parameter list of this function.\r
*\r
\r
/** Determines if a HID IN report has been received from the attached device on the data IN pipe.\r
*\r
+ * \note This function must only be called when the Host state machine is in the HOST_STATE_Configured state or the\r
+ * call will fail.\r
+ *\r
* \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state\r
*\r
* \return Boolean true if a report has been received, false otherwise\r
uint8_t HID_Host_SetReportProtocol(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo) ATTR_NON_NULL_PTR_ARG(1);\r
#endif\r
\r
+ /* Inline Functions: */\r
+ /** General management task for a given Human Interface Class host class interface, required for the correct operation of\r
+ * the interface. This should be called frequently in the main program loop, before the master USB management task\r
+ * \ref USB_USBTask().\r
+ *\r
+ * \param[in,out] HIDInterfaceInfo Pointer to a structure containing a HID Class host configuration and state\r
+ */\r
+ static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo);\r
+ static inline void HID_Host_USBTask(USB_ClassInfo_HID_Host_t* const HIDInterfaceInfo)\r
+ {\r
+ (void)HIDInterfaceInfo;\r
+ } \r
+\r
/* Private Interface - For use in library only: */\r
#if !defined(__DOXYGEN__)\r
/* Macros: */\r