Searched refs:ugd (Results 1 – 8 of 8) sorted by relevance
/freebsd/lib/libusbhid/ |
H A D | descr.c | 98 struct usb_gen_descriptor ugd; in hid_get_report_desc() local 102 memset(&ugd, 0, sizeof(ugd)); in hid_get_report_desc() 105 ugd.ugd_data = NULL; in hid_get_report_desc() 106 ugd.ugd_maxlen = 65535; in hid_get_report_desc() 107 if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) { in hid_get_report_desc() 121 data = malloc(ugd.ugd_actlen); in hid_get_report_desc() 126 ugd.ugd_data = data; in hid_get_report_desc() 127 ugd.ugd_maxlen = ugd.ugd_actlen; in hid_get_report_desc() 128 if (ioctl(fd, USB_GET_REPORT_DESC, &ugd) < 0) { in hid_get_report_desc() 135 if (ugd.ugd_actlen < 1) { in hid_get_report_desc() [all …]
|
H A D | data.c | 123 struct usb_gen_descriptor ugd; in hid_get_report() local 125 memset(&ugd, 0, sizeof(ugd)); in hid_get_report() 126 ugd.ugd_data = data; in hid_get_report() 127 ugd.ugd_maxlen = size; in hid_get_report() 128 ugd.ugd_report_type = k + 1; in hid_get_report() 129 return (ioctl(fd, USB_GET_REPORT, &ugd)); in hid_get_report() 135 struct usb_gen_descriptor ugd; in hid_set_report() local 137 memset(&ugd, 0, sizeof(ugd)); in hid_set_report() 138 ugd.ugd_data = data; in hid_set_report() 139 ugd.ugd_maxlen = size; in hid_set_report() [all …]
|
/freebsd/contrib/libfido2/src/ |
H A D | hid_freebsd.c | 42 struct usb_gen_descriptor ugd; in is_fido() local 46 memset(&ugd, 0, sizeof(ugd)); in is_fido() 48 ugd.ugd_report_type = UHID_FEATURE_REPORT; in is_fido() 49 ugd.ugd_data = buf; in is_fido() 50 ugd.ugd_maxlen = sizeof(buf); in is_fido() 52 if (ioctl(fd, IOCTL_REQ(USB_GET_REPORT_DESC), &ugd) == -1) { in is_fido() 56 if (ugd.ugd_actlen > sizeof(buf) || fido_hid_get_usage(ugd.ugd_data, in is_fido() 57 ugd.ugd_actlen, &usage_page) < 0) { in is_fido() 212 struct usb_gen_descriptor ugd; in fido_hid_open() local 216 memset(&ugd, 0, sizeof(ugd)); in fido_hid_open() [all …]
|
/freebsd/sys/dev/usb/input/ |
H A D | uhid_snes.c | 280 struct usb_gen_descriptor *ugd; in uhid_snes_ioctl() local 289 ugd = data; in uhid_snes_ioctl() 296 ugd = &local_ugd; in uhid_snes_ioctl() 297 usb_gen_descriptor_from32(ugd, ugd32); in uhid_snes_ioctl() 305 if (sc->sc_repdesc_size > ugd->ugd_maxlen) { in uhid_snes_ioctl() 306 size = ugd->ugd_maxlen; in uhid_snes_ioctl() 311 ugd->ugd_actlen = size; in uhid_snes_ioctl() 312 if (ugd->ugd_data == NULL) in uhid_snes_ioctl() 314 error = copyout(sc->sc_repdesc_ptr, ugd->ugd_data, size); in uhid_snes_ioctl() 345 switch (ugd->ugd_report_type) { in uhid_snes_ioctl() [all …]
|
H A D | uhid.c | 556 struct usb_gen_descriptor *ugd; in uhid_ioctl() local 565 ugd = addr; in uhid_ioctl() 572 ugd = &local_ugd; in uhid_ioctl() 573 usb_gen_descriptor_from32(ugd, ugd32); in uhid_ioctl() 581 if (sc->sc_repdesc_size > ugd->ugd_maxlen) { in uhid_ioctl() 582 size = ugd->ugd_maxlen; in uhid_ioctl() 586 ugd->ugd_actlen = size; in uhid_ioctl() 587 if (ugd->ugd_data == NULL) in uhid_ioctl() 589 error = copyout(sc->sc_repdesc_ptr, ugd->ugd_data, size); in uhid_ioctl() 620 switch (ugd->ugd_report_type) { in uhid_ioctl() [all …]
|
/freebsd/sys/dev/usb/ |
H A D | usb_generic.c | 113 static int ugen_get_iface_driver(struct usb_fifo *f, struct usb_gen_descriptor *ugd); 675 ugen_get_cdesc(struct usb_fifo *f, struct usb_gen_descriptor *ugd) in ugen_get_cdesc() argument 685 if (ugd->ugd_data == NULL) { in ugen_get_cdesc() 689 if ((ugd->ugd_config_index == USB_UNCONFIG_INDEX) || in ugen_get_cdesc() 690 (ugd->ugd_config_index == udev->curr_config_index)) { in ugen_get_cdesc() 699 NULL, &cdesc, ugd->ugd_config_index)) { in ugen_get_cdesc() 710 if (len > ugd->ugd_maxlen) { in ugen_get_cdesc() 711 len = ugd->ugd_maxlen; in ugen_get_cdesc() 715 ugd->ugd_actlen = len; in ugen_get_cdesc() 716 ugd->ugd_offset = 0; in ugen_get_cdesc() [all …]
|
H A D | usb_ioctl.h | 367 void usb_gen_descriptor_from32(struct usb_gen_descriptor *ugd, 370 struct usb_gen_descriptor *ugd);
|
/freebsd/lib/libusb/ |
H A D | libusb20_ugen20.c | 954 struct usb_gen_descriptor ugd; in ugen20_dev_get_iface_desc() local 956 memset(&ugd, 0, sizeof(ugd)); in ugen20_dev_get_iface_desc() 958 ugd.ugd_data = buf; in ugen20_dev_get_iface_desc() 959 ugd.ugd_maxlen = len; in ugen20_dev_get_iface_desc() 960 ugd.ugd_iface_index = iface_index; in ugen20_dev_get_iface_desc() 962 if (ioctl(pdev->file, IOUSB(USB_GET_IFACE_DRIVER), &ugd)) { in ugen20_dev_get_iface_desc()
|