mirror of
https://github.com/apache/nuttx.git
synced 2026-06-04 23:03:27 +08:00
CDC ACM fixes
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3981 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -4816,10 +4816,13 @@ build
|
||||
Default 4.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_CDCSER_VENDORID</code> and <code>CONFIG_CDCSER_VENDORSTR</code>: The vendor ID code/string. Default 0x03eb and "NuttX"
|
||||
<code>CONFIG_CDCSER_VENDORID</code> and <code>CONFIG_CDCSER_VENDORSTR</code>: The vendor ID code/string. Default 0x0525 and "NuttX,"
|
||||
0x0525 is the Netchip vendor and should not be used in any products.
|
||||
This default VID was selected for compatibility with the Linux CDC ACM default VID.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_CDCSER_PRODUCTID</code> and <code>CONFIG_CDCSER_PRODUCTSTR</code>: The product ID code/string. Default 0x204b and "CDC/ACM Serial"
|
||||
<code>CONFIG_CDCSER_PRODUCTID</code> and <code>CONFIG_CDCSER_PRODUCTSTR</code>: The product ID code/string. Default 0xa4a7 and "CDC/ACM Serial"
|
||||
0xa4a7 was selected for compatibility with the Linux CDC ACM default PID.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_CDCSER_RXBUFSIZE</code> and <code>CONFIG_CDCSER_TXBUFSIZE</code>: Size of the serial receive/transmit buffers. Default 256.
|
||||
|
||||
+7
-2
@@ -982,9 +982,14 @@ defconfig -- This is a configuration file similar to the Linux
|
||||
CONFIG_CDCSER_NWRREQS includes write requests used for both the
|
||||
interrupt and bulk IN endpoints. Default 4.
|
||||
CONFIG_CDCSER_VENDORID and CONFIG_CDCSER_VENDORSTR
|
||||
The vendor ID code/string. Default 0x03eb and "NuttX"
|
||||
The vendor ID code/string. Default 0x0525 and "NuttX"
|
||||
0x0525 is the Netchip vendor and should not be used in any
|
||||
products. This default VID was selected for compatibility with
|
||||
the Linux CDC ACM default VID.
|
||||
CONFIG_CDCSER_PRODUCTID and CONFIG_CDCSER_PRODUCTSTR
|
||||
The product ID code/string. Default 0x204b and "CDC/ACM Serial"
|
||||
The product ID code/string. Default 0xa4a7 and "CDC/ACM Serial"
|
||||
0xa4a7 was selected for compatibility with the Linux CDC ACM
|
||||
default PID.
|
||||
CONFIG_CDCSER_RXBUFSIZE and CONFIG_CDCSER_TXBUFSIZE
|
||||
Size of the serial receive/transmit buffers. Default 256.
|
||||
|
||||
|
||||
@@ -706,9 +706,14 @@ CONFIG_USBSER_TXBUFSIZE=512
|
||||
# The number of write/read requests that can be in flight.
|
||||
# Default 256.
|
||||
# CONFIG_CDCSER_VENDORID and CONFIG_CDCSER_VENDORSTR
|
||||
# The vendor ID code/string. Default 0x03eb and "NuttX"
|
||||
# The vendor ID code/string. Default 0x0525 and "NuttX"
|
||||
# 0x0525 is the Netchip vendor and should not be used in any
|
||||
# products. This default VID was selected for compatibility with
|
||||
# the Linux CDC ACM default VID.
|
||||
# CONFIG_CDCSER_PRODUCTID and CONFIG_CDCSER_PRODUCTSTR
|
||||
# The product ID code/string. Default 0x204b and "CDC/ACM Serial"
|
||||
# The product ID code/string. Default 0xara7 and "CDC/ACM Serial"
|
||||
# 0xa4a7 was selected for compatibility with the Linux CDC ACM
|
||||
# default PID.
|
||||
# CONFIG_CDCSER_RXBUFSIZE and CONFIG_CDCSER_TXBUFSIZE
|
||||
# Size of the serial receive/transmit buffers. Default 256.
|
||||
#
|
||||
|
||||
@@ -338,13 +338,16 @@ static const struct usb_devdesc_s g_devdesc =
|
||||
CDC_SUBCLASS_NONE, /* subclass */
|
||||
CDC_PROTO_NONE, /* protocol */
|
||||
CONFIG_CDCSER_EP0MAXPACKET, /* maxpacketsize */
|
||||
{ LSBYTE(CONFIG_CDCSER_VENDORID), /* vendor */
|
||||
{
|
||||
LSBYTE(CONFIG_CDCSER_VENDORID), /* vendor */
|
||||
MSBYTE(CONFIG_CDCSER_VENDORID)
|
||||
},
|
||||
{ LSBYTE(CONFIG_CDCSER_PRODUCTID), /* product */
|
||||
{
|
||||
LSBYTE(CONFIG_CDCSER_PRODUCTID), /* product */
|
||||
MSBYTE(CONFIG_CDCSER_PRODUCTID)
|
||||
},
|
||||
{ LSBYTE(CDCSER_VERSIONNO), /* device */
|
||||
{
|
||||
LSBYTE(CDCSER_VERSIONNO), /* device */
|
||||
MSBYTE(CDCSER_VERSIONNO)
|
||||
},
|
||||
CDCSER_MANUFACTURERSTRID, /* imfgr */
|
||||
@@ -550,7 +553,10 @@ static const struct usb_qualdesc_s g_qualdesc =
|
||||
{
|
||||
USB_SIZEOF_QUALDESC, /* len */
|
||||
USB_DESC_TYPE_DEVICEQUALIFIER, /* type */
|
||||
{LSBYTE(0x0200), MSBYTE(0x0200) }, /* USB */
|
||||
{ /* usb */
|
||||
LSBYTE(0x0200),
|
||||
MSBYTE(0x0200)
|
||||
},
|
||||
USB_CLASS_VENDOR_SPEC, /* class */
|
||||
0, /* subclass */
|
||||
0, /* protocol */
|
||||
@@ -733,6 +739,9 @@ static inline int usbclass_recvpacket(FAR struct usbser_dev_s *priv,
|
||||
uint16_t nexthead;
|
||||
uint16_t nbytes = 0;
|
||||
|
||||
uvdbg("head=%d tail=%d nrdq=%d reqlen=%d\n",
|
||||
priv->serdev.recv.head, priv->serdev.recv.tail, priv->nrdq, reqlen);
|
||||
|
||||
/* Get the next head index. During the time that RX interrupts are disabled, the
|
||||
* the serial driver will be extracting data from the circular buffer and modifying
|
||||
* recv.tail. During this time, we should avoid modifying recv.head; Instead we will
|
||||
|
||||
@@ -84,9 +84,14 @@
|
||||
* CONFIG_CDCSER_NWRREQS includes write requests used for both the
|
||||
* interrupt and bulk IN endpoints. Default 4.
|
||||
* CONFIG_CDCSER_VENDORID and CONFIG_CDCSER_VENDORSTR
|
||||
* The vendor ID code/string. Default 0x03eb and "NuttX"
|
||||
* The vendor ID code/string. Default 0x0525 and "NuttX"
|
||||
* 0x0525 is the Netchip vendor and should not be used in any
|
||||
* products. This default VID was selected for compatibility with
|
||||
* the Linux CDC ACM default VID.
|
||||
* CONFIG_CDCSER_PRODUCTID and CONFIG_CDCSER_PRODUCTSTR
|
||||
* The product ID code/string. Default 0x204b and "CDC/ACM Serial"
|
||||
* The product ID code/string. Default 0xa4a7 and "CDC/ACM Serial"
|
||||
* 0xa4a7 was selected for compatibility with the Linux CDC ACM
|
||||
* default PID.
|
||||
* CONFIG_CDCSER_RXBUFSIZE and CONFIG_CDCSER_TXBUFSIZE
|
||||
* Size of the serial receive/transmit buffers. Default 256.
|
||||
*/
|
||||
@@ -171,14 +176,16 @@
|
||||
# define CONFIG_CDCSER_TXBUFSIZE 256
|
||||
#endif
|
||||
|
||||
/* Vendor and product IDs and strings */
|
||||
/* Vendor and product IDs and strings. The default is the Linux Netchip
|
||||
* CDC ACM VID and PID.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_CDCSER_VENDORID
|
||||
# define CONFIG_CDCSER_VENDORID 0x03eb
|
||||
# define CONFIG_CDCSER_VENDORID 0x0525
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CDCSER_PRODUCTID
|
||||
# define CONFIG_CDCSER_PRODUCTID 0x204b
|
||||
# define CONFIG_CDCSER_PRODUCTID 0xa4a7
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CDCSER_VENDORSTR
|
||||
@@ -186,7 +193,7 @@
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CDCSER_PRODUCTSTR
|
||||
# define CONFIG_CDCSER_PRODUCTSTR "USBdev Serial"
|
||||
# define CONFIG_CDCSER_PRODUCTSTR "CDC ACM Serial"
|
||||
#endif
|
||||
|
||||
#undef CONFIG_CDCSER_SERIALSTR
|
||||
|
||||
Reference in New Issue
Block a user