Merge pull request #930 from projectkk2glider/usb_fixes
USB library fixes according to ST's published known bugs list
This commit is contained in:
+3
@@ -153,6 +153,9 @@ void USBD_Init(USB_OTG_CORE_HANDLE *pdev,
|
|||||||
/* Upon Init call usr callback */
|
/* Upon Init call usr callback */
|
||||||
pdev->dev.usr_cb->Init();
|
pdev->dev.usr_cb->Init();
|
||||||
|
|
||||||
|
/* Force Device Mode*/
|
||||||
|
USB_OTG_SetCurrentMode(pdev, DEVICE_MODE);
|
||||||
|
|
||||||
/* Enable Interrupts */
|
/* Enable Interrupts */
|
||||||
USB_OTG_BSP_EnableInterrupt(pdev);
|
USB_OTG_BSP_EnableInterrupt(pdev);
|
||||||
}
|
}
|
||||||
|
|||||||
+6
@@ -195,6 +195,12 @@ uint32_t USBD_OTG_EP1IN_ISR_Handler (USB_OTG_CORE_HANDLE *pdev)
|
|||||||
{
|
{
|
||||||
DCD_WriteEmptyTxFifo(pdev , 1);
|
DCD_WriteEmptyTxFifo(pdev , 1);
|
||||||
CLEAR_IN_EP_INTR(1, emptyintr);
|
CLEAR_IN_EP_INTR(1, emptyintr);
|
||||||
|
/*
|
||||||
|
Notice: this probabbly needs the same fix as DCD_HandleInEP_ISR(), but
|
||||||
|
leaving this out, we don't use this part of code
|
||||||
|
fifoemptymsk = 0x1 << 1;
|
||||||
|
USB_OTG_MODIFY_REG32(&pdev->regs.DREGS->DIEPEMPMSK, fifoemptymsk, 0);
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user