diff options
| author | hathach <[email protected]> | 2014-03-31 11:59:43 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2014-03-31 11:59:43 +0700 |
| commit | 6682720b2aecb777d8f8aceedbd49aaff4fbbc27 (patch) | |
| tree | 9fcb36a06d168b31b0027affdcb8265560b33a79 /tinyusb/class/hid_device.h | |
| parent | 0bb2cc64b0e1248bfc8e564755a0850b5e5ad762 (diff) | |
implement & document all the device class _mounted_cb & _unmounted_cb callbacks
Diffstat (limited to 'tinyusb/class/hid_device.h')
| -rw-r--r-- | tinyusb/class/hid_device.h | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/tinyusb/class/hid_device.h b/tinyusb/class/hid_device.h index c04d4ceac..e3a4b309d 100644 --- a/tinyusb/class/hid_device.h +++ b/tinyusb/class/hid_device.h @@ -80,7 +80,17 @@ tusb_error_t tusbd_hid_keyboard_send(uint8_t coreid, hid_keyboard_report_t const //--------------------------------------------------------------------+
// APPLICATION CALLBACK API
//--------------------------------------------------------------------+
+
+/** \brief Callback function that will be invoked when this interface is mounted (configured) by USB host
+ * \param[in] coreid USB Controller ID of the interface
+ * \note This callback should be used by Application to \b set-up interface-related data
+ */
void tusbd_hid_keyboard_mounted_cb(uint8_t coreid);
+
+/** \brief Callback function that will be invoked when this interface is unmounted (bus reset/unplugged)
+ * \param[in] coreid USB Controller ID of the interface
+ * \note This callback should be used by Application to \b tear-down interface-related data
+ */
void tusbd_hid_keyboard_unmounted_cb(uint8_t coreid);
/** \brief Callback function that is invoked when an transferring event occurred
@@ -155,8 +165,16 @@ tusb_error_t tusbd_hid_mouse_send(uint8_t coreid, hid_mouse_report_t const *p_re //--------------------------------------------------------------------+
// APPLICATION CALLBACK API
//--------------------------------------------------------------------+
-
+/** \brief Callback function that will be invoked when this interface is mounted (configured) by USB host
+ * \param[in] coreid USB Controller ID of the interface
+ * \note This callback should be used by Application to \b set-up interface-related data
+ */
void tusbd_hid_mouse_mounted_cb(uint8_t coreid);
+
+/** \brief Callback function that will be invoked when this interface is unmounted (bus reset/unplugged)
+ * \param[in] coreid USB Controller ID of the interface
+ * \note This callback should be used by Application to \b tear-down interface-related data
+ */
void tusbd_hid_mouse_unmounted_cb(uint8_t coreid);
/** \brief Callback function that is invoked when an transferring event occurred
|
