Home | History | Annotate | Download | only in usbhidctl

Lines Matching refs:item

87 	 * An instance number can be used to identify an item by
97 int (*opfunc)(struct hid_item *item, struct Susbvar *var,
302 * hidmatch() determines whether the item specified in 'item', and
308 hidmatch(u_int32_t const *collist, size_t collen, struct hid_item *item,
322 iscollection = item->kind == hid_collection ||
323 item->kind == hid_endcollection;
337 (item->flags & HIO_CONST)) {
345 ((item->kind != hid_output &&
346 item->kind != hid_feature) ||
347 (item->flags & HIO_CONST))) {
363 * the 'item' itself on the final iteration. For each usage,
376 cache.usage_id = item->usage;
498 varop_value(struct hid_item *item, struct Susbvar *var,
501 printf("%d\n", hid_get_data(buf, item));
507 varop_display(struct hid_item *item, struct Susbvar *var,
513 for (i = 0; i < item->report_count; i++) {
521 printf("%s:", hid_usage_page(HID_PAGE(item->usage)));
522 val = hid_get_data(buf, item);
523 item->pos += item->report_size;
524 if (item->usage_minimum != 0 || item->usage_maximum != 0) {
525 val += item->usage_minimum;
528 printf("%s=%d%s", hid_usage_in_page(item->usage),
529 val, item->flags & HIO_CONST ? " (const)" : "");
531 if (item->report_count > 1)
540 varop_modify(struct hid_item *item, struct Susbvar *var,
547 hid_set_data(buf, item, dataval);
551 varop_display(item, var, collist, collen, buf);
557 reportitem(char const *label, struct hid_item const *item, unsigned int mflags)
559 int isconst = item->flags & HIO_CONST,
560 isvar = item->flags & HIO_VARIABLE;
562 item->report_size, item->report_count,
565 hid_usage_page(HID_PAGE(item->usage)));
566 if (item->usage_minimum != 0 || item->usage_maximum != 0) {
567 printf(" usage=%s..%s", hid_usage_in_page(item->usage_minimum),
568 hid_usage_in_page(item->usage_maximum));
571 HID_PAGE(item->usage_minimum),
572 HID_USAGE(item->usage_minimum),
573 HID_PAGE(item->usage_maximum),
574 HID_USAGE(item->usage_maximum));
576 printf(" usage=%s", hid_usage_in_page(item->usage));
579 HID_PAGE(item->usage), HID_USAGE(item->usage));
582 item->logical_minimum, item->logical_maximum);
583 if (item->physical_minimum != item->physical_maximum)
585 item->physical_minimum, item->physical_maximum);
586 if (item->unit)
587 printf(", unit=0x%02x exp=%d", item->unit,
588 item->unit_exponent);
594 varop_report(struct hid_item *item, struct Susbvar *var,
597 switch (item->kind) {
600 hid_usage_page(HID_PAGE(item->usage)),
601 hid_usage_in_page(item->usage));
604 HID_PAGE(item->usage), HID_USAGE(item->usage));
612 reportitem("Input ", item, var->mflags);
615 reportitem("Output ", item, var->mflags);
618 reportitem("Feature", item, var->mflags);
678 errx(1, "Unexpected non-input item returned");
728 printf("item: kind=%d repid=%d usage=0x%x\n",
812 " %s -f device [-t tablefile] [-lnv] item [...]\n",
815 " %s -f device [-t tablefile] [-z] -w item=value [...]\n",
938 errx(1, "%s%c%s", "Error parsing item "
960 * necessary to get the item status.
967 /* Level 2: Show item numerics and constants */