If SETUP received, that also means the end of a previous TX

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2215 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo 2009-11-03 00:52:16 +00:00
parent 3c24e1beeb
commit 93b36a90b9
1 changed files with 2 additions and 3 deletions

View File

@ -1479,7 +1479,6 @@ static void stm32_epdone(struct stm32_usbdev_s *priv, ubyte epno)
/* Handle write requests */
privep->txbusy = FALSE;
priv->rxstatus = USB_EPR_STATRX_NAK;
stm32_wrrequest(priv, privep);
@ -1544,9 +1543,10 @@ static void stm32_ep0setup(struct stm32_usbdev_s *priv)
stm32_reqcomplete(ep0, result);
}
/* Assume NOT stalled */
/* Assume NOT stalled; no TX in progress */
ep0->stalled = 0;
ep0->txbusy = 0;
/* Get a 32-bit PMA address and use that to get the 8-byte setup request */
@ -2944,7 +2944,6 @@ static int stm32_epstall(struct usbdev_ep_s *ep, boolean resume)
if (!stm32_rqempty(privep))
{
privep->txbusy = FALSE;
(void)stm32_wrrequest(priv, privep);
stm32_seteptxstatus(epno, USB_EPR_STATTX_VALID);
}