Lines Matching refs:urb
319 usbdevfs_urb* urb = &h->urb_out; in usb_bulk_write() local
320 memset(urb, 0, sizeof(*urb)); in usb_bulk_write()
321 urb->type = USBDEVFS_URB_TYPE_BULK; in usb_bulk_write()
322 urb->endpoint = h->ep_out; in usb_bulk_write()
323 urb->status = -1; in usb_bulk_write()
324 urb->buffer = const_cast<void*>(data); in usb_bulk_write()
325 urb->buffer_length = len; in usb_bulk_write()
332 if (TEMP_FAILURE_RETRY(ioctl(h->fd, USBDEVFS_SUBMITURB, urb)) == -1) { in usb_bulk_write()
345 if (urb->status != 0) { in usb_bulk_write()
346 errno = -urb->status; in usb_bulk_write()
349 return urb->actual_length; in usb_bulk_write()
358 usbdevfs_urb* urb = &h->urb_in; in usb_bulk_read() local
359 memset(urb, 0, sizeof(*urb)); in usb_bulk_read()
360 urb->type = USBDEVFS_URB_TYPE_BULK; in usb_bulk_read()
361 urb->endpoint = h->ep_in; in usb_bulk_read()
362 urb->status = -1; in usb_bulk_read()
363 urb->buffer = data; in usb_bulk_read()
364 urb->buffer_length = len; in usb_bulk_read()
371 if (TEMP_FAILURE_RETRY(ioctl(h->fd, USBDEVFS_SUBMITURB, urb)) == -1) { in usb_bulk_read()
406 if (urb->status != 0) { in usb_bulk_read()
407 errno = -urb->status; in usb_bulk_read()
410 return urb->actual_length; in usb_bulk_read()