summaryrefslogtreecommitdiff
path: root/nuttx/arch/mips/src
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-31 19:20:26 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2013-01-31 19:20:26 +0000
commit0c168e13200e69223905946d865fceba15ba830f (patch)
tree6ab43c61dc2813511ef296f8cb313d1a4a217b07 /nuttx/arch/mips/src
parentd1aae41beb05cc207f99d50c93dc9dd1bbd7e774 (diff)
downloadpx4-nuttx-0c168e13200e69223905946d865fceba15ba830f.tar.gz
px4-nuttx-0c168e13200e69223905946d865fceba15ba830f.tar.bz2
px4-nuttx-0c168e13200e69223905946d865fceba15ba830f.zip
Missing calls to class SUSPEND/RESUME methods in all USB drivers
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@5590 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/mips/src')
-rw-r--r--nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c b/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c
index dafd35aa0..8d9f7c058 100644
--- a/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c
+++ b/nuttx/arch/mips/src/pic32mx/pic32mx-usbdev.c
@@ -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);
}
/****************************************************************************