summaryrefslogtreecommitdiff
path: root/src/class/hid
diff options
context:
space:
mode:
authorhathach <[email protected]>2019-05-01 17:07:33 +0700
committerhathach <[email protected]>2019-05-01 17:07:33 +0700
commit9fa5c8025faddfa68b506af3bf2b6383f70c8323 (patch)
tree03ab0813004f6537865a3d6b9fa9c8ba1bfe0494 /src/class/hid
parent84f81f6b213305207fa6d4d01ce6911f5ad3cf66 (diff)
clean up
Diffstat (limited to 'src/class/hid')
-rw-r--r--src/class/hid/hid_device.h26
1 files changed, 11 insertions, 15 deletions
diff --git a/src/class/hid/hid_device.h b/src/class/hid/hid_device.h
index c93055f06..d2eeebcf3 100644
--- a/src/class/hid/hid_device.h
+++ b/src/class/hid/hid_device.h
@@ -52,7 +52,17 @@ bool tud_hid_boot_mode(void);
// Send report to host
bool tud_hid_report(uint8_t report_id, void const* report, uint8_t len);
-/*------------- Callbacks (Weak is optional) -------------*/
+// KEYBOARD: convenient helper to send keyboard report if application
+// use template layout report as defined by hid_keyboard_report_t
+bool tud_hid_keyboard_report(uint8_t report_id, uint8_t modifier, uint8_t keycode[6]);
+
+// MOUSE: convenient helper to send mouse report if application
+// use template layout report as defined by hid_mouse_report_t
+bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8_t x, int8_t y, int8_t vertical, int8_t horizontal);
+
+//--------------------------------------------------------------------+
+// Callbacks (Weak is optional)
+//--------------------------------------------------------------------+
// Invoked when receiving GET_REPORT control request
// Application must fill buffer report's content and return its length.
@@ -70,20 +80,6 @@ ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t boot_mode);
// - Idle Rate > 0 : skip duplication, but send at least 1 report every idle rate (in unit of 4 ms).
ATTR_WEAK bool tud_hid_set_idle_cb(uint8_t idle_rate);
-//--------------------------------------------------------------------+
-// KEYBOARD: convenient helper to send keyboard report if application
-// use template layout report as defined by hid_keyboard_report_t
-//--------------------------------------------------------------------+
-
-bool tud_hid_keyboard_report(uint8_t report_id, uint8_t modifier, uint8_t keycode[6]);
-
-//--------------------------------------------------------------------+
-// MOUSE: convenient helper to send mouse report if application
-// use template layout report as defined by hid_mouse_report_t
-//--------------------------------------------------------------------+
-
-bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8_t x, int8_t y, int8_t vertical, int8_t horizontal);
-
/* --------------------------------------------------------------------+
* HID Report Descriptor Template
*