|
|
@@ -68,18 +68,21 @@ bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8_t x, int8_t y
|
|
|
// Callbacks (Weak is optional)
|
|
|
//--------------------------------------------------------------------+
|
|
|
|
|
|
-// Invoked when receiving GET_REPORT control request
|
|
|
+// Invoked when received GET_REPORT control request
|
|
|
// Application must fill buffer report's content and return its length.
|
|
|
// Return zero will cause the stack to STALL request
|
|
|
uint16_t tud_hid_get_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t* buffer, uint16_t reqlen);
|
|
|
|
|
|
-// Invoked when receiving SET_REPORT control request
|
|
|
+// Invoked when received SET_REPORT control request
|
|
|
void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize);
|
|
|
|
|
|
-// Invoked when host switch mode Boot <-> Report via SET_PROTOCOL request
|
|
|
+// Invoked when received data on OUT endpoint
|
|
|
+ATTR_WEAK void tud_hid_out_report_cb(uint8_t const* buffer, uint16_t bufsize);
|
|
|
+
|
|
|
+// Invoked when received SET_PROTOCOL request ( mode switch Boot <-> Report )
|
|
|
ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t boot_mode);
|
|
|
|
|
|
-// Invoked when host send SET_IDLE request. return false will stall the request
|
|
|
+// Invoked when received SET_IDLE request. return false will stall the request
|
|
|
// - Idle Rate = 0 : only send report if there is changes, i.e skip duplication
|
|
|
// - 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);
|