use tud_hid_set_report_cb for hid epout
This commit is contained in:
parent
353d415d3f
commit
3387b9fca5
|
@ -301,8 +301,7 @@ bool hidd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_
|
||||||
|
|
||||||
if (ep_addr == p_hid->ep_out)
|
if (ep_addr == p_hid->ep_out)
|
||||||
{
|
{
|
||||||
if (tud_hid_out_report_cb) tud_hid_out_report_cb(p_hid->epout_buf, xferred_bytes);
|
tud_hid_set_report_cb(0, HID_REPORT_TYPE_INVALID, p_hid->epout_buf, xferred_bytes);
|
||||||
|
|
||||||
TU_ASSERT(dcd_edpt_xfer(rhport, p_hid->ep_out, p_hid->epout_buf, sizeof(p_hid->epout_buf)));
|
TU_ASSERT(dcd_edpt_xfer(rhport, p_hid->ep_out, p_hid->epout_buf, sizeof(p_hid->epout_buf)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,12 +73,10 @@ bool tud_hid_mouse_report(uint8_t report_id, uint8_t buttons, int8_t x, int8_t y
|
||||||
// Return zero will cause the stack to STALL request
|
// 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);
|
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 received SET_REPORT control request
|
// Invoked when received SET_REPORT control request or
|
||||||
|
// received data on OUT endpoint ( Report ID = 0, Type = 0 )
|
||||||
void tud_hid_set_report_cb(uint8_t report_id, hid_report_type_t report_type, uint8_t const* buffer, uint16_t bufsize);
|
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 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 )
|
// Invoked when received SET_PROTOCOL request ( mode switch Boot <-> Report )
|
||||||
ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t boot_mode);
|
ATTR_WEAK void tud_hid_boot_mode_cb(uint8_t boot_mode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue