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);
}
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.