Lines 623-631
Link Here
|
623 |
/* Not yet done, because I haven't needed it. */ |
623 |
int ret; |
|
|
624 |
struct usb_ctl_request ctl_req; |
624 |
USB_ERROR_STR(-ENOSYS, "usb_clear_halt called, unimplemented on BSD"); |
625 |
ctl_req.ucr_addr = 0; // Not used for this type of request |
|
|
626 |
ctl_req.ucr_request.bmRequestType = UT_WRITE_ENDPOINT; |
627 |
ctl_req.ucr_request.bRequest = UR_CLEAR_FEATURE; |
628 |
USETW(ctl_req.ucr_request.wValue, UF_ENDPOINT_HALT); |
629 |
USETW(ctl_req.ucr_request.wIndex, ep); |
630 |
USETW(ctl_req.ucr_request.wLength, 0); |
631 |
ctl_req.ucr_flags = 0; |
632 |
|
633 |
if ((ret = ioctl(dev->fd, USB_DO_REQUEST, &ctl_req)) < 0) |
634 |
USB_ERROR_STR(-errno, "clear_halt: failed for %d", ep); |
635 |
|
636 |
return ret; |