提交 dded364b 编写于 作者: A Antonio Ospite 提交者: 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: NAntonio Ospite <ospite@studenti.unina.it>
Signed-off-by: NJiri Kosina <jkosina@suse.cz>
上级 34a5ceee
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册