diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-09-20 10:00:30 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-09-20 10:00:30 -0600 |
commit | c794150a59dd58c83ad5e80b20ce17d9b3713740 (patch) | |
tree | e6e3b2bbcdd8ed25877c26c78c4b577401467bbf /nuttx/drivers/usbdev | |
parent | bfcf82862ab67196f91f5f6138c20111503b55d1 (diff) | |
download | px4-nuttx-c794150a59dd58c83ad5e80b20ce17d9b3713740.tar.gz px4-nuttx-c794150a59dd58c83ad5e80b20ce17d9b3713740.tar.bz2 px4-nuttx-c794150a59dd58c83ad5e80b20ce17d9b3713740.zip |
Names of some USB device definitions changed to avoid collisions
Diffstat (limited to 'nuttx/drivers/usbdev')
-rw-r--r-- | nuttx/drivers/usbdev/cdcacm_desc.c | 4 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/composite.h | 12 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/composite_desc.c | 4 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/pl2303.c | 16 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/usbmsc.h | 14 | ||||
-rw-r--r-- | nuttx/drivers/usbdev/usbmsc_desc.c | 4 |
6 files changed, 37 insertions, 17 deletions
diff --git a/nuttx/drivers/usbdev/cdcacm_desc.c b/nuttx/drivers/usbdev/cdcacm_desc.c index 58dcc123f..6f22ddad8 100644 --- a/nuttx/drivers/usbdev/cdcacm_desc.c +++ b/nuttx/drivers/usbdev/cdcacm_desc.c @@ -134,7 +134,9 @@ static const struct usb_cfgdesc_s g_cfgdesc = CDCACM_NINTERFACES, /* ninterfaces */ CDCACM_CONFIGID, /* cfgvalue */ CDCACM_CONFIGSTRID, /* icfg */ - USB_CONFIG_ATTR_ONE|SELFPOWERED|REMOTEWAKEUP, /* attr */ + USB_CONFIG_ATTR_ONE | /* attr */ + CDCACM_SELFPOWERED | + CDCACM_REMOTEWAKEUP, (CONFIG_USBDEV_MAXPOWER + 1) / 2 /* mxpower */ }; #endif diff --git a/nuttx/drivers/usbdev/composite.h b/nuttx/drivers/usbdev/composite.h index 0c022427c..ae97b25fb 100644 --- a/nuttx/drivers/usbdev/composite.h +++ b/nuttx/drivers/usbdev/composite.h @@ -103,6 +103,18 @@ #undef CONFIG_COMPOSITE_CONFIGSTR #define CONFIG_COMPOSITE_CONFIGSTR "Composite" +#ifdef CONFIG_USBDEV_SELFPOWERED +# define COMPOSITE_SELFPOWERED USB_CONFIG_ATTR_SELFPOWER +#else +# define COMPOSITE_SELFPOWERED (0) +#endif + +#ifdef CONFIG_USBDEV_REMOTEWAKEUP +# define COMPOSITE_REMOTEWAKEUP USB_CONFIG_ATTR_WAKEUP +#else +# define COMPOSITE_REMOTEWAKEUP (0) +#endif + /* Constituent devices ******************************************************/ #undef DEV1_IS_CDCACM diff --git a/nuttx/drivers/usbdev/composite_desc.c b/nuttx/drivers/usbdev/composite_desc.c index 0a0cd4a6a..2cc94e07f 100644 --- a/nuttx/drivers/usbdev/composite_desc.c +++ b/nuttx/drivers/usbdev/composite_desc.c @@ -125,7 +125,9 @@ static const struct usb_cfgdesc_s g_cfgdesc = COMPOSITE_NINTERFACES, /* ninterfaces */ COMPOSITE_CONFIGID, /* cfgvalue */ COMPOSITE_CONFIGSTRID, /* icfg */ - USB_CONFIG_ATTR_ONE|SELFPOWERED|REMOTEWAKEUP, /* attr */ + USB_CONFIG_ATTR_ONE | /* attr */ + COMPOSITE_SELFPOWERED | + COMPOSITE_REMOTEWAKEUP, (CONFIG_USBDEV_MAXPOWER + 1) / 2 /* mxpower */ }; diff --git a/nuttx/drivers/usbdev/pl2303.c b/nuttx/drivers/usbdev/pl2303.c index 4f75275e2..8c36ade4c 100644 --- a/nuttx/drivers/usbdev/pl2303.c +++ b/nuttx/drivers/usbdev/pl2303.c @@ -139,16 +139,16 @@ /* USB Controller */ -#ifndef CONFIG_USBDEV_SELFPOWERED -# define SELFPOWERED USB_CONFIG_ATTR_SELFPOWER +#ifdef CONFIG_USBDEV_SELFPOWERED +# define PL2303_SELFPOWERED USB_CONFIG_ATTR_SELFPOWER #else -# define SELFPOWERED (0) +# define PL2303_SELFPOWERED (0) #endif -#ifndef CONFIG_USBDEV_REMOTEWAKEUP -# define REMOTEWAKEUP USB_CONFIG_ATTR_WAKEUP +#ifdef CONFIG_USBDEV_REMOTEWAKEUP +# define PL2303_REMOTEWAKEUP USB_CONFIG_ATTR_WAKEUP #else -# define REMOTEWAKEUP (0) +# define PL2303_REMOTEWAKEUP (0) #endif #ifndef CONFIG_USBDEV_MAXPOWER @@ -438,7 +438,9 @@ static const struct usb_cfgdesc_s g_cfgdesc = PL2303_NINTERFACES, /* ninterfaces */ PL2303_CONFIGID, /* cfgvalue */ PL2303_CONFIGSTRID, /* icfg */ - USB_CONFIG_ATTR_ONE|SELFPOWERED|REMOTEWAKEUP, /* attr */ + USB_CONFIG_ATTR_ONE | /* attr */ + PL2303_SELFPOWERED | + PL2303_REMOTEWAKEUP, (CONFIG_USBDEV_MAXPOWER + 1) / 2 /* mxpower */ }; diff --git a/nuttx/drivers/usbdev/usbmsc.h b/nuttx/drivers/usbdev/usbmsc.h index da35ae923..23c623692 100644 --- a/nuttx/drivers/usbdev/usbmsc.h +++ b/nuttx/drivers/usbdev/usbmsc.h @@ -1,7 +1,7 @@ /**************************************************************************** * drivers/usbdev/usbmsc.h * - * Copyright (C) 2008-2012 Gregory Nutt. All rights reserved. + * Copyright (C) 2008-2013 Gregory Nutt. All rights reserved. * Author: Gregory Nutt <gnutt@nuttx.org> * * Mass storage class device. Bulk-only with SCSI subclass. @@ -226,16 +226,16 @@ /* USB Controller */ -#ifndef CONFIG_USBDEV_SELFPOWERED -# define SELFPOWERED USB_CONFIG_ATTR_SELFPOWER +#ifdef CONFIG_USBDEV_SELFPOWERED +# define USBMSC_SELFPOWERED USB_CONFIG_ATTR_SELFPOWER #else -# define SELFPOWERED (0) +# define USBMSC_SELFPOWERED (0) #endif -#ifndef CONFIG_USBDEV_REMOTEWAKEUP -# define REMOTEWAKEUP USB_CONFIG_ATTR_WAKEUP +#ifdef CONFIG_USBDEV_REMOTEWAKEUP +# define USBMSC_REMOTEWAKEUP USB_CONFIG_ATTR_WAKEUP #else -# define REMOTEWAKEUP (0) +# define USBMSC_REMOTEWAKEUP (0) #endif #ifndef CONFIG_USBDEV_MAXPOWER diff --git a/nuttx/drivers/usbdev/usbmsc_desc.c b/nuttx/drivers/usbdev/usbmsc_desc.c index 90e9decda..81e188dab 100644 --- a/nuttx/drivers/usbdev/usbmsc_desc.c +++ b/nuttx/drivers/usbdev/usbmsc_desc.c @@ -116,7 +116,9 @@ static const struct usb_cfgdesc_s g_cfgdesc = USBMSC_NINTERFACES, /* ninterfaces */ USBMSC_CONFIGID, /* cfgvalue */ USBMSC_CONFIGSTRID, /* icfg */ - USB_CONFIG_ATTR_ONE|SELFPOWERED|REMOTEWAKEUP, /* attr */ + USB_CONFIG_ATTR_ONE | /* attr */ + USBMSC_SELFPOWERED | + USBMSC_REMOTEWAKEUP, (CONFIG_USBDEV_MAXPOWER + 1) / 2 /* mxpower */ }; #endif |