diff options
| author | hathach <[email protected]> | 2013-10-29 15:09:16 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2013-10-29 15:09:16 +0700 |
| commit | 5ab195a73d58bcf8d104a7b49d2674368c292792 (patch) | |
| tree | 70c2b92e69489d869daf55a31082074a7a3f10e8 /tinyusb/class | |
| parent | db986b3107c5e7c0c91cb808c0676313ba598cab (diff) | |
temporarily implementation of dcd_pipe_is_busy
Diffstat (limited to 'tinyusb/class')
| -rw-r--r-- | tinyusb/class/hid_device.c | 5 | ||||
| -rw-r--r-- | tinyusb/class/hid_device.h | 18 |
2 files changed, 21 insertions, 2 deletions
diff --git a/tinyusb/class/hid_device.c b/tinyusb/class/hid_device.c index b2733978f..14258c493 100644 --- a/tinyusb/class/hid_device.c +++ b/tinyusb/class/hid_device.c @@ -351,6 +351,11 @@ ErrorCode_t HID_EpOut_Hdlr (USBD_HANDLE_T hUsb, void* data, uint32_t event) //--------------------------------------------------------------------+ // APPLICATION API //--------------------------------------------------------------------+ +bool tusbd_hid_keyboard_is_busy(uint8_t coreid) +{ + return dcd_pipe_is_busy(keyboardd_data.ept_handle); +} + tusb_error_t tusbd_hid_keyboard_send(uint8_t coreid, hid_keyboard_report_t const *p_kbd_report) { //------------- verify data -------------// diff --git a/tinyusb/class/hid_device.h b/tinyusb/class/hid_device.h index 9c63e2dd3..c74148d26 100644 --- a/tinyusb/class/hid_device.h +++ b/tinyusb/class/hid_device.h @@ -47,22 +47,36 @@ extern "C" { #endif + //--------------------------------------------------------------------+ // KEYBOARD Application API //--------------------------------------------------------------------+ /** \addtogroup ClassDriver_HID_Keyboard Keyboard * @{ */ - /** \defgroup Keyboard_Device Device - * The interface API includes status checking function, data transferring function and callback functions * @{ */ +bool tusbd_hid_keyboard_is_busy(uint8_t coreid); tusb_error_t tusbd_hid_keyboard_send(uint8_t coreid, hid_keyboard_report_t const *p_kbd_report); + +/** @} */ +/** @} */ + +//--------------------------------------------------------------------+ +// MOUSE APPLICATION API +//--------------------------------------------------------------------+ +/** \addtogroup ClassDriver_HID_Mouse Mouse + * @{ */ +/** \defgroup Mouse_Device Device + * @{ */ + tusb_error_t tusbd_hid_mouse_send(uint8_t coreid, hid_mouse_report_t const *p_mouse_report); /** @} */ /** @} */ + + //--------------------------------------------------------------------+ // USBD-CLASS DRIVER API //--------------------------------------------------------------------+ |
