diff options
| author | hathach <[email protected]> | 2013-10-30 12:52:25 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-10-30 12:52:25 +0700 |
| commit | b8a7ea6d46a49c1974e3f8d73aef19116927d0b2 (patch) | |
| tree | 355c12e800dd09381176cdd1128c79fc0d7ad5aa /tinyusb/class | |
| parent | d67a7b7959342e93c6ae63d5dac5149dec76d0e6 (diff) | |
add dcd control pipe stall protocol
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/hid_device.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tinyusb/class/hid_device.h b/tinyusb/class/hid_device.h index c3b0f041a..a03f805d4 100644 --- a/tinyusb/class/hid_device.h +++ b/tinyusb/class/hid_device.h @@ -100,10 +100,29 @@ void tusbd_hid_keyboard_isr(uint8_t coreid, tusb_event_t event); /** \defgroup Mouse_Device Device * @{ */ +/** \brief Check if the interface is currently busy or not + * \param[in] coreid USB Controller ID + * \retval true if the interface is busy meaning the stack is still transferring/waiting data from/to host + * \retval false if the interface is not busy meaning the stack successfully transferred data from/to host + * \note This function is primarily used for polling/waiting result after \ref tusbd_hid_mouse_send. + */ bool tusbd_hid_mouse_is_busy(uint8_t coreid); +/** \brief Perform transfer queuing + * \param[in] coreid USB Controller ID + * \param[in,out] p_report address that is used to store data from device. Must be accessible by usb controller (see \ref TUSB_CFG_ATTR_USBRAM) + * \returns \ref tusb_error_t type to indicate success or error condition. + * \retval TUSB_ERROR_NONE on success + * \retval TUSB_ERROR_INTERFACE_IS_BUSY if the interface is already transferring data with device + * \retval TUSB_ERROR_DEVICE_NOT_READY if device is not yet configured (by SET CONFIGURED request) + * \retval TUSB_ERROR_INVALID_PARA if input parameters are not correct + * \note This function is non-blocking and returns immediately. Data will be transferred when USB Host work with this interface. + * The result of usb transfer will be reported by the interface's callback function + */ tusb_error_t tusbd_hid_mouse_send(uint8_t coreid, hid_mouse_report_t const *p_report); +void tusbd_hid_mouse_isr(uint8_t coreid, tusb_event_t event); + /** @} */ /** @} */ |
