mirror of
https://github.com/opentx/opentx.git
synced 2025-07-24 16:55:20 +03:00
Merge pull request #930 from projectkk2glider/usb_fixes
USB library fixes according to ST's published known bugs list
This commit is contained in:
commit
29e47006ae
2 changed files with 9 additions and 0 deletions
|
@ -153,6 +153,9 @@ void USBD_Init(USB_OTG_CORE_HANDLE *pdev,
|
|||
/* Upon Init call usr callback */
|
||||
pdev->dev.usr_cb->Init();
|
||||
|
||||
/* Force Device Mode*/
|
||||
USB_OTG_SetCurrentMode(pdev, DEVICE_MODE);
|
||||
|
||||
/* Enable Interrupts */
|
||||
USB_OTG_BSP_EnableInterrupt(pdev);
|
||||
}
|
||||
|
|
|
@ -195,6 +195,12 @@ uint32_t USBD_OTG_EP1IN_ISR_Handler (USB_OTG_CORE_HANDLE *pdev)
|
|||
{
|
||||
DCD_WriteEmptyTxFifo(pdev , 1);
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue