fix USB enabling

Change-Id: I22cdd77648ac21490909423bf529fb31f30d6af0
This commit is contained in:
Kevin Redon 2018-12-18 13:26:34 +01:00
parent 56739ea049
commit 74a8e3b615
1 changed files with 22 additions and 24 deletions

View File

@ -46,10 +46,8 @@ static int32_t dfudf_enable(struct usbdf_driver *drv, struct usbd_descriptors *d
usb_iface_desc_t ifc_desc;
uint8_t * ifc;
uint8_t i;
ifc = desc->sod;
for (i = 0; i < 2; i++) {
if (NULL == ifc) {
return ERR_NOT_FOUND;
}
@ -72,7 +70,7 @@ static int32_t dfudf_enable(struct usbdf_driver *drv, struct usbd_descriptors *d
// there are no endpoint to install since DFU uses only the control endpoint
ifc = usb_find_desc(usb_desc_next(desc->sod), desc->eod, USB_DT_INTERFACE);
}
// Installed
_dfudf_funcd.enabled = true;
return ERR_NONE;