diff options
author | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-17 09:14:12 -0800 |
---|---|---|
committer | Lorenz Meier <lm@inf.ethz.ch> | 2013-02-17 09:14:12 -0800 |
commit | 520a2b417410bed7db6f08a3a69f3bcccc55910b (patch) | |
tree | 2365774545ed145c307630b63cb5f075fca71c21 /nuttx/arch/arm/src/stm32/stm32_usbdev.c | |
parent | 2745c3276f5c2377a9713555c5941b17912b6ce7 (diff) | |
parent | caa11f0bbb7f30679c5c01a64e1d0f6d8627db9d (diff) | |
download | px4-firmware-520a2b417410bed7db6f08a3a69f3bcccc55910b.tar.gz px4-firmware-520a2b417410bed7db6f08a3a69f3bcccc55910b.tar.bz2 px4-firmware-520a2b417410bed7db6f08a3a69f3bcccc55910b.zip |
Merge pull request #198 from PX4/nuttx-merge-5596
Nuttx merge 5596
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); + } } /**************************************************************************** |