The HID_SetReport function obtains report data from the
host by copying them from the endpoint 0 buffer (EP0Buf).
The function calls SetOutReport to update other application
variables. Modify the HID_SetReport function to obtain as many
bytes as your application needs from the host. The
HID_SetReport function supports the request
HID_REPORT_OUTPUT only.
The HID_SetReport function is part of the USB Function
Driver layer of the RL-USB Software Stack.
Note
You must copy all your report data from the endpoint buffer,
otherwise the report data might be lost.
#include <hiduser.h>
bool HID_SetReport (void) {
switch (SetupPacket.wValue.WB.H) {
case HID_REPORT_INPUT:
OutReport = EPoBuf [0]; // copy report vars to the endpoint buffer.
SetInReport (); // your function to update the report vars.
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.