Content originally posted in LPCWare by Tsuneo on Tue Jul 01 09:37:55 MST 2014
Quote:
I also discovered that the two functions responsible for information exchange are not being called, i.e HID_SetReport and HID_GetReport.
HID_SetReport() and HID_GetReport() are called just when your host sends Set/GetReport request over the control transfer. These routines are not called by the interrupt OUT/IN endpoint events.
When the interrupt OUT EP receives an output report, HID_Ep_Hdlr() callback is called with USB_EVT_OUT "event" parameter. Your code reads out the report using USBD_API->hw->ReadEP(), as the HID_Ep_Hdlr( USB_EVT_OUT ) does on usbd_rom_hid_generic example, hid_generic.c
You may send an input report over the interrupt IN EP, using USBD_API->hw->WriteEP(), as the above routine does.
Tsuneo