Use new upstream usbdrvce features.
This commit is contained in:
parent
0b40c0d4a9
commit
6048945f1a
1 changed files with 3 additions and 9 deletions
12
src/main.c
12
src/main.c
|
|
@ -842,18 +842,12 @@ static usb_endpoint_t get_endpoint(
|
|||
static usb_error_t stall_data_endpoints(
|
||||
usb_endpoint_t endpoint) {
|
||||
printf("stalling data endpoints\n");
|
||||
#if 0
|
||||
usb_error_t error;
|
||||
error = usb_StallEndpoint(
|
||||
usb_error_t error = usb_SetEndpointHalt(
|
||||
get_endpoint(endpoint, MTP_EP_DATA_IN));
|
||||
if (error == USB_SUCCESS)
|
||||
error = usb_StallEndpoint(
|
||||
error = usb_SetEndpointHalt(
|
||||
get_endpoint(endpoint, MTP_EP_DATA_OUT));
|
||||
return error;
|
||||
#else
|
||||
(void)endpoint;
|
||||
return USB_ERROR_FAILED;
|
||||
#endif
|
||||
}
|
||||
|
||||
static usb_error_t schedule_event(
|
||||
|
|
@ -2199,7 +2193,7 @@ static usb_error_t usb_event(usb_event_t event,
|
|||
(USB_DEVICE_TO_HOST |
|
||||
USB_STANDARD_REQUEST |
|
||||
USB_RECIPIENT_DEVICE) &&
|
||||
setup->bRequest == USB_GET_DESCRIPTOR &&
|
||||
setup->bRequest == USB_GET_DESCRIPTOR_REQUEST &&
|
||||
setup->wValue == 0x03EE && !setup->wIndex) {
|
||||
DEFINE_STRING_DESCRIPTOR(const, os_specific);
|
||||
error = usb_ScheduleTransfer(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue