Missing calls to class SUSPEND/RESUME methods in all USB drivers

git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5590 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
patacongo
2013-01-31 19:20:26 +00:00
parent 9de6f4d501
commit 28a0241ccd
10 changed files with 353 additions and 24 deletions
+17 -2
View File
@@ -2901,6 +2901,13 @@ static void pic32mx_suspend(struct pic32mx_usbdev_s *priv)
{
uint16_t regval;
/* Notify the class driver of the suspend event */
if (priv->driver)
{
CLASS_SUSPEND(priv->driver, &priv->usbdev);
}
/* Enable the ACTV interrupt.
*
* NOTE: Do not clear UIRbits.ACTVIF here! Reason: ACTVIF is only
@@ -2977,8 +2984,16 @@ static void pic32mx_resume(struct pic32mx_usbdev_s *priv)
* PLL to lock.
*/
pic32mx_putreg(USB_INT_IDLE, PIC32MX_USBOTG_IR);
irqrestore(flags);
pic32mx_putreg(USB_INT_IDLE, PIC32MX_USBOTG_IR);
/* Notify the class driver of the resume event */
if (priv->driver)
{
CLASS_RESUME(priv->driver, &priv->usbdev);
}
irqrestore(flags);
}
/****************************************************************************