diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-11 19:38:58 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2008-10-11 19:38:58 +0000 |
commit | 5de6ee9256688fbc892d1a40d15d9430d1efd5b4 (patch) | |
tree | 224d4fc70b42af9d1d5605b76b081c4b3a2a8ccb | |
parent | 3b2030d6a688297d67c8a994502b9f692466e509 (diff) | |
download | nuttx-5de6ee9256688fbc892d1a40d15d9430d1efd5b4.tar.gz nuttx-5de6ee9256688fbc892d1a40d15d9430d1efd5b4.tar.bz2 nuttx-5de6ee9256688fbc892d1a40d15d9430d1efd5b4.zip |
reorder macros, reduce size of request buffer for EP0
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@1032 42af7a65-404d-4744-a932-0658087f49c3
-rw-r--r-- | nuttx/drivers/usbdev/usbdev_serial.c | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/nuttx/drivers/usbdev/usbdev_serial.c b/nuttx/drivers/usbdev/usbdev_serial.c index cb8e9fff8..096cdeceb 100644 --- a/nuttx/drivers/usbdev/usbdev_serial.c +++ b/nuttx/drivers/usbdev/usbdev_serial.c @@ -140,12 +140,18 @@ # define SELFPOWERED (0) #endif -#ifndef CONFIG_USBDEV_REMOTEWAKEUP +#ifndef CONFIG_USBDEV_REMOTEWAKEUP # define REMOTEWAKEUP USB_CONFIG_ATTR_WAKEUP #else # define REMOTEWAKEUP (0) #endif +#ifndef CONFIG_USBDEV_MAXPOWER +# define CONFIG_USBDEV_MAXPOWER 100 +#endif + +/* Descriptors ****************************************************************/ + /* These settings are not modifiable via the NuttX configuration */ #define USBSER_VERSIONNO (0x0202) /* Device version number */ @@ -169,21 +175,6 @@ #define USBSER_EPINBULK_ADDR (USB_DIR_IN|CONFIG_USBSER_EPBULKIN) #define USBSER_EPINBULK_ATTR (USB_EP_ATTR_XFER_BULK) -/* Vender specific control requests */ - -#define PL2303_CONTROL_TYPE (0x20) -#define PL2303_SETLINEREQUEST (0x20) /* OUT, Recipient interface */ -#define PL2303_GETLINEREQUEST (0x21) /* IN, Recipient interface */ -#define PL2303_SETCONTROLREQUEST (0x22) /* OUT, Recipient interface */ -#define PL2303_BREAKREQUEST (0x23) /* OUT, Recipient interface */ - -/* Vendor read/write */ - -#define PL2303_RWREQUEST_TYPE (0x40) -#define PL2303_RWREQUEST (0x01) /* IN/OUT, Recipient device */ - -/* Values *********************************************************************/ - /* String language */ #define USBSER_STR_LANGUAGE (0x0409) /* en-us */ @@ -197,7 +188,22 @@ /* Buffer big enough for any of our descriptors */ -#define USBSER_MXDESCLEN (256) +#define USBSER_MXDESCLEN (64) + +/* Vender specific control requests *******************************************/ + +#define PL2303_CONTROL_TYPE (0x20) +#define PL2303_SETLINEREQUEST (0x20) /* OUT, Recipient interface */ +#define PL2303_GETLINEREQUEST (0x21) /* IN, Recipient interface */ +#define PL2303_SETCONTROLREQUEST (0x22) /* OUT, Recipient interface */ +#define PL2303_BREAKREQUEST (0x23) /* OUT, Recipient interface */ + +/* Vendor read/write */ + +#define PL2303_RWREQUEST_TYPE (0x40) +#define PL2303_RWREQUEST (0x01) /* IN/OUT, Recipient device */ + +/* Misc Macros ****************************************************************/ /* min/max macros */ @@ -382,7 +388,7 @@ static const struct uart_ops_s g_uartops = usbser_txempty /* txempty */ }; -/* USB descriptor templates these will be copied and modified */ +/* USB descriptor templates these will be copied and modified **************/ static const struct usb_devdesc_s g_devdesc = { |