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 | 0c168e13200e69223905946d865fceba15ba830f (patch) | |
tree | 6ab43c61dc2813511ef296f8cb313d1a4a217b07 /nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c | |
parent | d1aae41beb05cc207f99d50c93dc9dd1bbd7e774 (diff) | |
download | px4-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/arm/src/lpc17xx/lpc17_usbdev.c')
-rw-r--r-- | nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c b/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c index b1ddb5928..753f82326 100644 --- a/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c +++ b/nuttx/arch/arm/src/lpc17xx/lpc17_usbdev.c @@ -2175,6 +2175,22 @@ static int lpc17_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(LPC17_TRACEINTID_SUSPENDCHG), (uint16_t)g_usbdev.devstatus); + + /* Inform the Class driver of the change */ + + if (priv->driver) + { + if (DEVSTATUS_SUSPEND(g_usbdev.devstatus)) + { + CLASS_SUSPEND(priv->driver, &priv->usbdev); + } + else + { + CLASS_RESUME(priv->driver, &priv->usbdev); + } + } + + /* TODO: Perform power management operations here. */ } /* Device reset */ |