diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-31 19:20:26 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2013-01-31 19:20:26 +0000 |
commit | 28a0241ccd48963a13638c1dfbef161ab1bf557e (patch) | |
tree | 6ab43c61dc2813511ef296f8cb313d1a4a217b07 /nuttx/arch/arm/src/stm32/stm32_usbdev.c | |
parent | 9de6f4d501826f76a5cce3631c6b98b1a6c01d0a (diff) | |
download | px4-firmware-28a0241ccd48963a13638c1dfbef161ab1bf557e.tar.gz px4-firmware-28a0241ccd48963a13638c1dfbef161ab1bf557e.tar.bz2 px4-firmware-28a0241ccd48963a13638c1dfbef161ab1bf557e.zip |
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
Diffstat (limited to 'nuttx/arch/arm/src/stm32/stm32_usbdev.c')
-rw-r--r-- | nuttx/arch/arm/src/stm32/stm32_usbdev.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/stm32/stm32_usbdev.c b/nuttx/arch/arm/src/stm32/stm32_usbdev.c index 602de3824..d13ac8f96 100644 --- a/nuttx/arch/arm/src/stm32/stm32_usbdev.c +++ b/nuttx/arch/arm/src/stm32/stm32_usbdev.c @@ -2346,6 +2346,13 @@ static void stm32_suspend(struct stm32_usbdev_s *priv) { uint16_t regval; + /* Notify the class driver of the suspend event */ + + if (priv->driver) + { + CLASS_SUSPEND(priv->driver, &priv->usbdev); + } + /* Disable ESOF polling, disable the SUSP interrupt, and enable the WKUP * interrupt. Clear any pending WKUP interrupt. */ @@ -2411,6 +2418,13 @@ static void stm32_initresume(struct stm32_usbdev_s *priv) /* Reset FSUSP bit and enable normal interrupt handling */ stm32_putreg(STM32_CNTR_SETUP, STM32_USB_CNTR); + + /* Notify the class driver of the resume event */ + + if (priv->driver) + { + CLASS_RESUME(priv->driver, &priv->usbdev); + } } /**************************************************************************** |