|
|
@ -150,8 +150,15 @@ static int usb_standard_set_configuration(struct usb_setup_data *req, |
|
|
|
/* Reset all endpoints. */ |
|
|
|
_usbd_hw_endpoints_reset(); |
|
|
|
|
|
|
|
if (_usbd_device.user_callback_set_config) |
|
|
|
if (_usbd_device.user_callback_set_config) { |
|
|
|
/* Flush control callbacks. These will be reregistered
|
|
|
|
* by the user handler. */ |
|
|
|
int i; |
|
|
|
for(i = 0; i < MAX_USER_CONTROL_CALLBACK; i++) |
|
|
|
_usbd_device.user_control_callback[i].cb = NULL; |
|
|
|
|
|
|
|
_usbd_device.user_callback_set_config(req->wValue); |
|
|
|
} |
|
|
|
|
|
|
|
return 1; |
|
|
|
} |
|
|
|