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
This commit is contained in:
patacongo 2008-10-11 19:38:58 +00:00
parent 6eaeba8337
commit 5eb4cc2cdd

View file

@ -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 =
{