diff options
| author | hathach <[email protected]> | 2013-10-24 15:48:57 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-10-24 15:48:57 +0700 |
| commit | d8d00ca7688c489b427d398e2e4d8e0dc89ecede (patch) | |
| tree | f98af2fa104cfbc1b0555924bf2f52485c5e759e /tinyusb | |
| parent | b71ffe3d5a7b97010b7ac2096271e03dcb35c2dd (diff) | |
refractor HID document
Diffstat (limited to 'tinyusb')
| -rw-r--r-- | tinyusb/class/hid_host.h | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/tinyusb/class/hid_host.h b/tinyusb/class/hid_host.h index f282621e9..434318b45 100644 --- a/tinyusb/class/hid_host.h +++ b/tinyusb/class/hid_host.h @@ -50,12 +50,16 @@ extern "C" {
#endif
-/** \defgroup hid_keyboard Keyboard
- * The interface API includes status checking function, data transferring function and callback functions
- * @{ */
//--------------------------------------------------------------------+
// KEYBOARD Application API
//--------------------------------------------------------------------+
+/** \addtogroup ClassDriver_HID_Keyboard Keyboard
+ * @{ */
+
+/** \defgroup Keyboard_Host Host
+ * The interface API includes status checking function, data transferring function and callback functions
+ * @{ */
+
extern uint8_t const hid_keycode_to_ascii_tbl[2][128]; // TODO used weak attr if build failed without KEYBOARD enabled
/** \brief Check if device supports Keyboard interface or not
@@ -109,14 +113,20 @@ void tusbh_hid_keyboard_mounted_cb(uint8_t dev_addr); * \note This callback should be used by Application to tear-down interface-related data
*/
void tusbh_hid_keyboard_unmounted_cb(uint8_t dev_addr);
-/** @} */
-/** \defgroup hid_mouse Mouse
- * The interface API includes status checking function, data transferring function and callback functions
- * @{ */
+/** @} */ // Keyboard_Host
+/** @} */ // ClassDriver_HID_Keyboard
+
//--------------------------------------------------------------------+
// MOUSE Application API
//--------------------------------------------------------------------+
+/** \addtogroup ClassDriver_HID_Mouse Mouse
+ * @{ */
+
+/** \defgroup Mouse_Host Host
+ * The interface API includes status checking function, data transferring function and callback functions
+ * @{ */
+
/** \brief Check if device supports Mouse interface or not
* \param[in] dev_addr device address
* \retval true if device supports Mouse interface
@@ -168,14 +178,20 @@ void tusbh_hid_mouse_mounted_cb(uint8_t dev_addr); * \note This callback should be used by Application to tear-down interface-related data
*/
void tusbh_hid_mouse_unmounted_cb(uint8_t dev_addr);
-/** @} */
-/** \defgroup hid_generic Generic (not supported yet)
- * The interface API includes status checking function, data transferring function and callback functions
- * @{ */
+/** @} */ // Mouse_Host
+/** @} */ // ClassDriver_HID_Mouse
+
//--------------------------------------------------------------------+
// GENERIC Application API
//--------------------------------------------------------------------+
+/** \addtogroup ClassDriver_HID_Generic Generic
+ * @{ */
+
+/** \defgroup Generic_Host Host
+ * The interface API includes status checking function, data transferring function and callback functions
+ * @{ */
+
bool tusbh_hid_generic_is_mounted(uint8_t dev_addr) ATTR_PURE ATTR_WARN_UNUSED_RESULT;
tusb_error_t tusbh_hid_generic_get_report(uint8_t dev_addr, void* p_report, bool int_on_complete) ATTR_WARN_UNUSED_RESULT;
tusb_error_t tusbh_hid_generic_set_report(uint8_t dev_addr, void* p_report, bool int_on_complete) ATTR_WARN_UNUSED_RESULT;
@@ -184,7 +200,9 @@ tusb_interface_status_t tusbh_hid_generic_set_status(uint8_t dev_addr) ATTR_WARN //------------- Application Callback -------------//
void tusbh_hid_generic_isr(uint8_t dev_addr, tusb_event_t event);
-/** @} */
+
+/** @} */ // Generic_Host
+/** @} */ // ClassDriver_HID_Generic
//--------------------------------------------------------------------+
// USBH-CLASS DRIVER API
@@ -210,4 +228,4 @@ void hidh_close(uint8_t dev_addr); #endif /* _TUSB_HID_HOST_H_ */
-/** @} */
+/** @} */ // ClassDriver_HID
|
