The HID_GetReport function sends the requested report data
to the host by writing the data into the endpoint 0 buffer
(EP0Buf).
Call GetInReport to update the report variable (InReport).
Modify the HID_GetReport function to obtain your report data
and copy them into the endpoint buffer. The function supports the
HID_REPORT_INPUT request only.
The HID_GetReport function is part of the USB Function
Driver layer of the RL-USB Software Stack.
Note
If you modify the HID_GetReport function, then you must
also modify the corresponding endpoint function,
USB_EndPoint1, because the host might use either one of
these functions to obtain the report data.
#include <hiduser.h>
bool HID_GetReport (void) {
switch (SetupPacket.wValue.WB.H) {
case HID_REPORT_INPUT:
GetInReport (); // your function to update the report vars.
EP0Buf [0] = InReport; // copy report vars to the endpoint buffer.
break;
…
}
return (__TRUE);
}
Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers of your data.