1
0
Fork 0

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: Antonio Ospite <ospite@studenti.unina.it>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
hifive-unleashed-5.1
Antonio Ospite 2008-10-02 22:15:02 +02:00 committed by Jiri Kosina
parent 34a5ceee5e
commit dded364bf4
1 changed files with 2 additions and 0 deletions

View File

@ -193,6 +193,8 @@ struct hiddev_usage_ref_multi {
* finfo.field_index = i;
* ioctl(fd, HIDIOCGFIELDINFO, &finfo);
* for (j = 0; j < finfo.maxusage; j++) {
* uref.report_type = rinfo.report_type;
* uref.report_id = rinfo.report_id;
* uref.field_index = i;
* uref.usage_index = j;
* ioctl(fd, HIDIOCGUCODE, &uref);