Lines Matching refs:ep

349 static void clear_endpoint_descriptor(struct usb_endpoint_descriptor *ep)  in clear_endpoint_descriptor()  argument
351 if (ep->extra) in clear_endpoint_descriptor()
352 free(ep->extra); in clear_endpoint_descriptor()
729 API_EXPORTED int usb_resetep(usb_dev_handle *dev, unsigned int ep) in usb_resetep() argument
731 return compat_err(usb_clear_halt(dev, ep)); in usb_resetep()
734 API_EXPORTED int usb_clear_halt(usb_dev_handle *dev, unsigned int ep) in usb_clear_halt() argument
736 usbi_dbg("endpoint %x", ep); in usb_clear_halt()
737 return compat_err(libusb_clear_halt(dev->handle, ep & 0xff)); in usb_clear_halt()
746 static int usb_bulk_io(usb_dev_handle *dev, int ep, char *bytes, in usb_bulk_io() argument
751 usbi_dbg("endpoint %x size %d timeout %d", ep, size, timeout); in usb_bulk_io()
752 r = libusb_bulk_transfer(dev->handle, ep & 0xff, bytes, size, in usb_bulk_io()
763 API_EXPORTED int usb_bulk_read(usb_dev_handle *dev, int ep, char *bytes, in usb_bulk_read() argument
766 if (!(ep & USB_ENDPOINT_IN)) { in usb_bulk_read()
771 ep |= USB_ENDPOINT_IN; in usb_bulk_read()
774 return usb_bulk_io(dev, ep, bytes, size, timeout); in usb_bulk_read()
777 API_EXPORTED int usb_bulk_write(usb_dev_handle *dev, int ep, char *bytes, in usb_bulk_write() argument
780 if (ep & USB_ENDPOINT_IN) { in usb_bulk_write()
785 ep &= ~USB_ENDPOINT_IN; in usb_bulk_write()
788 return usb_bulk_io(dev, ep, bytes, size, timeout); in usb_bulk_write()
791 static int usb_interrupt_io(usb_dev_handle *dev, int ep, char *bytes, in usb_interrupt_io() argument
796 usbi_dbg("endpoint %x size %d timeout %d", ep, size, timeout); in usb_interrupt_io()
797 r = libusb_interrupt_transfer(dev->handle, ep & 0xff, bytes, size, in usb_interrupt_io()
808 API_EXPORTED int usb_interrupt_read(usb_dev_handle *dev, int ep, char *bytes, in usb_interrupt_read() argument
811 if (!(ep & USB_ENDPOINT_IN)) { in usb_interrupt_read()
816 ep |= USB_ENDPOINT_IN; in usb_interrupt_read()
818 return usb_interrupt_io(dev, ep, bytes, size, timeout); in usb_interrupt_read()
821 API_EXPORTED int usb_interrupt_write(usb_dev_handle *dev, int ep, char *bytes, in usb_interrupt_write() argument
824 if (ep & USB_ENDPOINT_IN) { in usb_interrupt_write()
829 ep &= ~USB_ENDPOINT_IN; in usb_interrupt_write()
832 return usb_interrupt_io(dev, ep, bytes, size, timeout); in usb_interrupt_write()
884 API_EXPORTED int usb_get_descriptor_by_endpoint(usb_dev_handle *dev, int ep, in usb_get_descriptor_by_endpoint() argument
892 LIBUSB_ENDPOINT_IN | (ep & 0xff), LIBUSB_REQUEST_GET_DESCRIPTOR, in usb_get_descriptor_by_endpoint()