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/lpc214x/lpc214x_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/lpc214x/lpc214x_usbdev.c')
-rw-r--r-- | nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c index 78a5fe1c3..78dc86992 100644 --- a/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c +++ b/nuttx/arch/arm/src/lpc214x/lpc214x_usbdev.c @@ -1,7 +1,7 @@ /******************************************************************************* * arch/arm/src/lpc214x/lpc214x_usbdev.c * - * Copyright (C) 2008-2010, 2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2010, 2012-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Redistribution and use in source and binary forms, with or without @@ -2139,6 +2139,22 @@ static int lpc214x_usbinterrupt(int irq, FAR void *context) { usbtrace(TRACE_INTDECODE(LPC214X_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 */ |