summaryrefslogtreecommitdiff
path: root/src/class
diff options
context:
space:
mode:
authorhathach <[email protected]>2018-07-26 11:27:34 +0700
committerhathach <[email protected]>2018-07-26 11:27:34 +0700
commit602315cd57535598c88034727116532689ed6b65 (patch)
tree1c30b24c78284b0b3fd4e65de23a7e59d7989310 /src/class
parent8694285ad2fc7bd5caf8c35691056252ef534c7b (diff)
fix hid keyboard idle rate
Diffstat (limited to 'src/class')
-rw-r--r--src/class/hid/hid_device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index 81805665e..7aeb39957 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -115,7 +115,7 @@ static bool hidd_kbd_report(hid_keyboard_report_t const *p_report)
if ( 0 == memcmp(p_hid->report_buf, p_report, sizeof(hid_keyboard_report_t)) ) return true;
}
- tu_timeout_restart(&idle_tm);
+ tu_timeout_set(&idle_tm, p_hid->idle_rate *4);
memcpy(p_hid->report_buf, p_report, sizeof(hid_keyboard_report_t));
return dcd_edpt_xfer(TUD_OPT_RHPORT, p_hid->ep_in, p_hid->report_buf, sizeof(hid_keyboard_report_t));