mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 01:05:54 +08:00
STM32 OTG FS device fix from Petteri Aimonen
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5318 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -3900,7 +3900,7 @@ static void stm32_epout_disable(FAR struct stm32_ep_s *privep)
|
||||
* Name: stm32_epin_disable
|
||||
*
|
||||
* Description:
|
||||
* Diable an IN endpoint will no longer be used
|
||||
* Disable an IN endpoint when it will no longer be used
|
||||
*
|
||||
*******************************************************************************/
|
||||
|
||||
@@ -3912,6 +3912,17 @@ static void stm32_epin_disable(FAR struct stm32_ep_s *privep)
|
||||
|
||||
usbtrace(TRACE_EPDISABLE, privep->epphy);
|
||||
|
||||
/* After USB reset, the endpoint will already be deactivated by the
|
||||
* hardware. Trying to disable again will just hang in the wait.
|
||||
*/
|
||||
|
||||
regaddr = STM32_OTGFS_DIEPCTL(privep->epphy);
|
||||
regval = stm32_getreg(regaddr);
|
||||
if ((regval & OTGFS_DIEPCTL_USBAEP) == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/* Make sure that there is no pending IPEPNE interrupt (because we are
|
||||
* to poll this bit below).
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user