summaryrefslogtreecommitdiff
path: root/src/class/hid/hid_device.c
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-07-24 20:41:06 +0700
committerhathach <[email protected]>2018-07-24 20:41:06 +0700
commitb370283174fbdb066bc662f8885956dbf947559b (patch)
treeb586774d3dccec53ec402242da369611570b7f1f /src/class/hid/hid_device.c
parent17369cfda0f077c29eea1f7ab486d60167511f36 (diff)
rename tud_hid_mouse_busy to tud_hid_mouse_ready
Diffstat (limited to 'src/class/hid/hid_device.c')
-rw-r--r--src/class/hid/hid_device.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index 9f54da34f..292024a61 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -173,14 +173,15 @@ bool tud_hid_keyboard_key_sequence(const char* str, uint32_t interval_ms)
// MOUSE APPLICATION API
//--------------------------------------------------------------------+
#if CFG_TUD_HID_MOUSE
-bool tud_hid_mouse_busy(void)
+bool tud_hid_mouse_ready(void)
{
- return dcd_edpt_busy(TUD_OPT_RHPORT, _mse_itf.ep_in);
+ VERIFY( _mse_itf.ep_in != 0 );
+ return !dcd_edpt_busy(TUD_OPT_RHPORT, _mse_itf.ep_in);
}
-bool tud_hid_mouse_report(hid_mouse_report_t const *p_report)
+static bool hidd_mouse_report(hid_mouse_report_t const *p_report)
{
- VERIFY( tud_mounted() && !tud_hid_mouse_busy() );
+ VERIFY( tud_hid_mouse_ready() );
hidd_interface_t * p_hid = &_mse_itf;
memcpy(p_hid->report_buf, p_report, sizeof(hid_mouse_report_t));