9
0
Fork 0

reorder macros, reduce size of request buffer for EP0

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@1032 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo 2008-10-11 19:38:58 +00:00
parent 3762466671
commit 62517de27b
1 changed files with 24 additions and 18 deletions

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