Merge pull request #254 from weety/Branch_usb

[USB]fix rt_usbd_set_config() BUG which set the USB device to configurat...
This commit is contained in:
Bernard Xiong 2014-04-10 16:34:32 +08:00
commit abcef00c8e
1 changed files with 1 additions and 2 deletions

View File

@ -372,6 +372,7 @@ static rt_err_t _set_config(struct udevice* device, ureq_t setup)
/* set current configuration */
rt_usbd_set_config(device, setup->value);
dcd_set_config(device->dcd, setup->value);
cfg = device->curr_cfg;
for (i=cfg->func_list.next; i!=&cfg->func_list; i=i->next)
@ -1599,8 +1600,6 @@ rt_err_t rt_usbd_set_config(udevice_t device, rt_uint8_t value)
/* set as current configuration */
device->curr_cfg = cfg;
dcd_set_config(device->dcd, value);
return RT_TRUE;
}