Commit dded364b authored by Antonio Ospite's avatar Antonio Ospite Committed by Jiri Kosina

HID: hiddev.h: Fix example code.

Fix hiddev.h example code.
To get the correct usage code, you need to set report_type and
report_id.
Signed-off-by: default avatarAntonio Ospite <ospite@studenti.unina.it>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 34a5ceee
...@@ -193,6 +193,8 @@ struct hiddev_usage_ref_multi { ...@@ -193,6 +193,8 @@ struct hiddev_usage_ref_multi {
* finfo.field_index = i; * finfo.field_index = i;
* ioctl(fd, HIDIOCGFIELDINFO, &finfo); * ioctl(fd, HIDIOCGFIELDINFO, &finfo);
* for (j = 0; j < finfo.maxusage; j++) { * for (j = 0; j < finfo.maxusage; j++) {
* uref.report_type = rinfo.report_type;
* uref.report_id = rinfo.report_id;
* uref.field_index = i; * uref.field_index = i;
* uref.usage_index = j; * uref.usage_index = j;
* ioctl(fd, HIDIOCGUCODE, &uref); * ioctl(fd, HIDIOCGUCODE, &uref);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment