/* To do a GUSAGE/SUSAGE, fill in at least usage_code, report_type and *report_id.Setreport_idtoREPORT_ID_UNKNOWNiftherestofthefields *areunknown.Otherwiseuseausage_refstructfilledinfromaprevious *successfulGUSAGEcalltosavetime.Toactuallysendavaluetothe *device,performaSUSAGEfirst,followedbyaSREPORT.AnINITREPORTora *GREPORTisn'tnecessaryforaGUSAGEtoreturnvaliddata.
*/ #define HID_REPORT_ID_UNKNOWN 0xffffffff #define HID_REPORT_ID_FIRST 0x00000100 #define HID_REPORT_ID_NEXT 0x00000200 #define HID_REPORT_ID_MASK 0x000000ff #define HID_REPORT_ID_MAX 0x000000ff
struct hiddev_field_info {
__u32 report_type;
__u32 report_id;
__u32 field_index;
__u32 maxusage;
__u32 flags;
__u32 physical; /* physical usage for this field */
__u32 logical; /* logical usage for this field */
__u32 application; /* application usage for this field */
__s32 logical_minimum;
__s32 logical_maximum;
__s32 physical_minimum;
__s32 physical_maximum;
__u32 unit_exponent;
__u32 unit;
};
/* Fill in report_type, report_id and field_index to get the information on a *field.
*/ #define HID_FIELD_CONSTANT 0x001 #define HID_FIELD_VARIABLE 0x002 #define HID_FIELD_RELATIVE 0x004 #define HID_FIELD_WRAP 0x008 #define HID_FIELD_NONLINEAR 0x010 #define HID_FIELD_NO_PREFERRED 0x020 #define HID_FIELD_NULL_STATE 0x040 #define HID_FIELD_VOLATILE 0x080 #define HID_FIELD_BUFFERED_BYTE 0x100
/* hiddev_usage_ref_multi is used for sending multiple bytes to a control.
* It really manifests itself as setting the value of consecutive usages */ #define HID_MAX_MULTI_USAGES 1024 struct hiddev_usage_ref_multi { struct hiddev_usage_ref uref;
__u32 num_values;
__s32 values[HID_MAX_MULTI_USAGES];
};
/* FIELD_INDEX_NONE is returned in read() data from the kernel when flags *issetto(HIDDEV_FLAG_UREF|HIDDEV_FLAG_REPORT)andanewreporthas *beensentbythedevice
*/ #define HID_FIELD_INDEX_NONE 0xffffffff
/* To traverse the input report descriptor info for a HID device, perform the *following: * *rinfo.report_type=HID_REPORT_TYPE_INPUT; *rinfo.report_id=HID_REPORT_ID_FIRST; *ret=ioctl(fd,HIDIOCGREPORTINFO,&rinfo); * *while(ret>=0){ *for(i=0;i<rinfo.num_fields;i++){ *finfo.report_type=rinfo.report_type; *finfo.report_id=rinfo.report_id; *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); *ioctl(fd,HIDIOCGUSAGE,&uref); *} *} *rinfo.report_id|=HID_REPORT_ID_NEXT; *ret=ioctl(fd,HIDIOCGREPORTINFO,&rinfo); *}
*/
#endif/* _UAPI_HIDDEV_H */
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.12Bemerkung:
(vorverarbeitet am 2026-09-30)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.