mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
- Add usb_clear_halt implementation.
- Bump PORTREVISION. PR: 100718 Submitted by: Robert Nilsson <rnilsson@mac.com> Approved by: maintainer arved (mentor)
This commit is contained in:
parent
4e754778fd
commit
6e12912dea
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=169122
2 changed files with 27 additions and 0 deletions
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
PORTNAME= libusb
|
PORTNAME= libusb
|
||||||
PORTVERSION= 0.1.12
|
PORTVERSION= 0.1.12
|
||||||
|
PORTREVISION= 1
|
||||||
CATEGORIES= devel
|
CATEGORIES= devel
|
||||||
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
|
||||||
MASTER_SITE_SUBDIR= ${PORTNAME}
|
MASTER_SITE_SUBDIR= ${PORTNAME}
|
||||||
|
|
26
devel/libusb/files/patch-bsd.c
Normal file
26
devel/libusb/files/patch-bsd.c
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
--- bsd.c.orig Sun Jul 30 11:18:07 2006
|
||||||
|
+++ bsd.c Sun Jul 30 11:20:30 2006
|
||||||
|
@@ -623,9 +623,21 @@
|
||||||
|
|
||||||
|
int usb_clear_halt(usb_dev_handle *dev, unsigned int ep)
|
||||||
|
{
|
||||||
|
- /* Not yet done, because I haven't needed it. */
|
||||||
|
+ int ret;
|
||||||
|
+ struct usb_ctl_request ctl_req;
|
||||||
|
|
||||||
|
- USB_ERROR_STR(-ENOSYS, "usb_clear_halt called, unimplemented on BSD");
|
||||||
|
+ ctl_req.ucr_addr = 0; // Not used for this type of request
|
||||||
|
+ ctl_req.ucr_request.bmRequestType = UT_WRITE_ENDPOINT;
|
||||||
|
+ ctl_req.ucr_request.bRequest = UR_CLEAR_FEATURE;
|
||||||
|
+ USETW(ctl_req.ucr_request.wValue, UF_ENDPOINT_HALT);
|
||||||
|
+ USETW(ctl_req.ucr_request.wIndex, ep);
|
||||||
|
+ USETW(ctl_req.ucr_request.wLength, 0);
|
||||||
|
+ ctl_req.ucr_flags = 0;
|
||||||
|
+
|
||||||
|
+ if ((ret = ioctl(dev->fd, USB_DO_REQUEST, &ctl_req)) < 0)
|
||||||
|
+ USB_ERROR_STR(-errno, "clear_halt: failed for %d", ep);
|
||||||
|
+
|
||||||
|
+ return ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
int usb_reset(usb_dev_handle *dev)
|
Loading…
Add table
Reference in a new issue