mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-11-29 07:24:13 +01:00
OP-901 fixed errors due to unused parameter and applied fix against fifo empty bug on usb_dcd_int.c
This commit is contained in:
parent
95a3e99b7c
commit
30b755b7aa
@ -798,7 +798,7 @@ void USBD_ParseSetupRequest( USB_OTG_CORE_HANDLE *pdev,
|
||||
*/
|
||||
|
||||
void USBD_CtlError( USB_OTG_CORE_HANDLE *pdev,
|
||||
USB_SETUP_REQ *req)
|
||||
__attribute__((unused)) USB_SETUP_REQ *req)
|
||||
{
|
||||
|
||||
DCD_EP_Stall(pdev , 0x80);
|
||||
|
@ -426,7 +426,7 @@ static uint32_t DCD_HandleInEP_ISR(USB_OTG_CORE_HANDLE *pdev)
|
||||
|
||||
uint32_t ep_intr;
|
||||
uint32_t epnum = 0;
|
||||
uint32_t fifoemptymsk;
|
||||
// uint32_t fifoemptymsk;
|
||||
diepint.d32 = 0;
|
||||
ep_intr = USB_OTG_ReadDevAllInEPItr(pdev);
|
||||
|
||||
@ -437,8 +437,10 @@ static uint32_t DCD_HandleInEP_ISR(USB_OTG_CORE_HANDLE *pdev)
|
||||
diepint.d32 = DCD_ReadDevInEP(pdev , epnum); /* Get In ITR status */
|
||||
if ( diepint.b.xfercompl )
|
||||
{
|
||||
#if 0 // THIS CODE IS REMOVED, done in DCD_WriteEmptyTxFifo()
|
||||
fifoemptymsk = 0x1 << epnum;
|
||||
USB_OTG_MODIFY_REG32(&pdev->regs.DREGS->DIEPEMPMSK, fifoemptymsk, 0);
|
||||
#endif
|
||||
CLEAR_IN_EP_INTR(epnum, xfercompl);
|
||||
/* TX COMPLETE */
|
||||
USBD_DCD_INT_fops->DataInStage(pdev , epnum);
|
||||
@ -677,7 +679,15 @@ static uint32_t DCD_WriteEmptyTxFifo(USB_OTG_CORE_HANDLE *pdev, uint32_t epnum)
|
||||
|
||||
txstatus.d32 = USB_OTG_READ_REG32(&pdev->regs.INEP_REGS[epnum]->DTXFSTS);
|
||||
}
|
||||
|
||||
uint32_t fifoemptymsk;
|
||||
// --- start fix (just before return 1)
|
||||
if (len < ep->maxpacket)
|
||||
{
|
||||
// FIFO empty
|
||||
fifoemptymsk = 0x1 << epnum;
|
||||
USB_OTG_MODIFY_REG32(&pdev->regs.DREGS->DIEPEMPMSK, fifoemptymsk, 0);
|
||||
}
|
||||
// end of fix
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user