A little progress with CDC ACM driver
git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@3959 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
parent
f23910b3c4
commit
6b507a7c3a
|
@ -4778,7 +4778,7 @@ build
|
|||
<code>CONFIG_CDCSER</code>: Enable compilation of the USB serial driver
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_CDCSER_EP0MAXPACKET</code>: Endpoint 0 max packet size. Default 8.
|
||||
<code>CONFIG_CDCSER_EP0MAXPACKET</code>: Endpoint 0 max packet size. Default 64.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_CDCSER_EPINTIN</code>: The logical 7-bit address of a hardware endpoint that supports
|
||||
|
@ -4788,7 +4788,7 @@ build
|
|||
<code>CONFIG_CDCSER_EPINTIN_FSSIZE</code>: Max package size for the interrupt IN endpoint if full speed mode. Default 64.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_CDCSER_EPINTIN_HSSIZE</code>: Max package size for the interrupt IN endpoint if high speed mode. Default 512.
|
||||
<code>CONFIG_CDCSER_EPINTIN_HSSIZE</code>: Max package size for the interrupt IN endpoint if high speed mode. Default 64.
|
||||
</li>
|
||||
<li>
|
||||
<code>CONFIG_CDCSER_EPBULKOUT</code>: The logical 7-bit address of a hardware endpoint that supports
|
||||
|
|
|
@ -949,7 +949,7 @@ defconfig -- This is a configuration file similar to the Linux
|
|||
CONFIG_CDCSER
|
||||
Enable compilation of the USB serial driver
|
||||
CONFIG_CDCSER_EP0MAXPACKET
|
||||
Endpoint 0 max packet size. Default 8.
|
||||
Endpoint 0 max packet size. Default 64.
|
||||
CONFIG_CDCSER_EPINTIN
|
||||
The logical 7-bit address of a hardware endpoint that supports
|
||||
interrupt IN operation. Default 2.
|
||||
|
@ -958,7 +958,7 @@ defconfig -- This is a configuration file similar to the Linux
|
|||
Default 64.
|
||||
CONFIG_CDCSER_EPINTIN_HSSIZE
|
||||
Max package size for the interrupt IN endpoint if high speed mode.
|
||||
Default 512.
|
||||
Default 64.
|
||||
CONFIG_CDCSER_EPBULKOUT
|
||||
The logical 7-bit address of a hardware endpoint that supports
|
||||
bulk OUT operation
|
||||
|
|
|
@ -67,14 +67,14 @@
|
|||
/* Descriptors ****************************************************************/
|
||||
/* These settings are not modifiable via the NuttX configuration */
|
||||
|
||||
#define CDC_VERSIONNO 0x010a /* CDC version number 1.10 */
|
||||
#define CDC_VERSIONNO 0x0110 /* CDC version number 1.10 (BCD) */
|
||||
#define CDCSER_CONFIGIDNONE (0) /* Config ID means to return to address mode */
|
||||
#define CDCSER_INTERFACEID (0)
|
||||
#define CDCSER_ALTINTERFACEID (0)
|
||||
|
||||
/* Device descriptor values */
|
||||
|
||||
#define CDCSER_VERSIONNO (0x0101) /* Device version number 1.1 */
|
||||
#define CDCSER_VERSIONNO (0x0101) /* Device version number 1.1 (BCD) */
|
||||
#define CDCSER_NCONFIGS (1) /* Number of configurations supported */
|
||||
|
||||
/* Configuration descriptor values */
|
||||
|
@ -330,17 +330,23 @@ static const struct usb_devdesc_s g_devdesc =
|
|||
{
|
||||
USB_SIZEOF_DEVDESC, /* len */
|
||||
USB_DESC_TYPE_DEVICE, /* type */
|
||||
{LSBYTE(0x0200), MSBYTE(0x0200)}, /* usb */
|
||||
{ /* usb */
|
||||
LSBYTE(0x0200),
|
||||
MSBYTE(0x0200)
|
||||
},
|
||||
USB_CLASS_CDC, /* class */
|
||||
CDC_SUBCLASS_NONE, /* subclass */
|
||||
CDC_PROTO_NONE, /* protocol */
|
||||
CONFIG_CDCSER_EP0MAXPACKET, /* maxpacketsize */
|
||||
{ LSBYTE(CONFIG_CDCSER_VENDORID), /* vendor */
|
||||
MSBYTE(CONFIG_CDCSER_VENDORID) },
|
||||
MSBYTE(CONFIG_CDCSER_VENDORID)
|
||||
},
|
||||
{ LSBYTE(CONFIG_CDCSER_PRODUCTID), /* product */
|
||||
MSBYTE(CONFIG_CDCSER_PRODUCTID) },
|
||||
MSBYTE(CONFIG_CDCSER_PRODUCTID)
|
||||
},
|
||||
{ LSBYTE(CDCSER_VERSIONNO), /* device */
|
||||
MSBYTE(CDCSER_VERSIONNO) },
|
||||
MSBYTE(CDCSER_VERSIONNO)
|
||||
},
|
||||
CDCSER_MANUFACTURERSTRID, /* imfgr */
|
||||
CDCSER_PRODUCTSTRID, /* iproduct */
|
||||
CDCSER_SERIALSTRID, /* serno */
|
||||
|
@ -458,7 +464,7 @@ static const struct usb_epdesc_s g_epbulkoutdesc =
|
|||
USB_SIZEOF_EPDESC, /* len */
|
||||
USB_DESC_TYPE_ENDPOINT, /* type */
|
||||
CDCSER_EPOUTBULK_ADDR, /* addr */
|
||||
CDCSER_EPINTIN_ATTR, /* attr */
|
||||
CDCSER_EPOUTBULK_ATTR, /* attr */
|
||||
{
|
||||
LSBYTE(CONFIG_CDCSER_EPBULKOUT_FSSIZE), /* maxpacket (full speed) */
|
||||
MSBYTE(CONFIG_CDCSER_EPBULKOUT_FSSIZE)
|
||||
|
@ -1926,7 +1932,6 @@ static int usbclass_setup(FAR struct usbdev_s *dev, const struct usb_ctrlreq_s *
|
|||
usbclass_ep0incomplete(dev->ep0, ctrlreq);
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@
|
|||
/* CONFIG_CDCSER
|
||||
* Enable compilation of the USB serial driver
|
||||
* CONFIG_CDCSER_EP0MAXPACKET
|
||||
* Endpoint 0 max packet size. Default 8.
|
||||
* Endpoint 0 max packet size. Default 64.
|
||||
* CONFIG_CDCSER_EPINTIN
|
||||
* The logical 7-bit address of a hardware endpoint that supports
|
||||
* interrupt IN operation. Default 2.
|
||||
|
@ -60,7 +60,7 @@
|
|||
* Default 64.
|
||||
* CONFIG_CDCSER_EPINTIN_HSSIZE
|
||||
* Max package size for the interrupt IN endpoint if high speed mode.
|
||||
* Default 512.
|
||||
* Default 64.
|
||||
* CONFIG_CDCSER_EPBULKOUT
|
||||
* The logical 7-bit address of a hardware endpoint that supports
|
||||
* bulk OUT operation
|
||||
|
@ -94,7 +94,7 @@
|
|||
/* EP0 max packet size */
|
||||
|
||||
#ifndef CONFIG_CDCSER_EP0MAXPACKET
|
||||
# define CONFIG_CDCSER_EP0MAXPACKET 8
|
||||
# define CONFIG_CDCSER_EP0MAXPACKET 64
|
||||
#endif
|
||||
|
||||
/* Endpoint number and size (in bytes) of the CDC serial device-to-host (IN)
|
||||
|
@ -106,11 +106,11 @@
|
|||
#endif
|
||||
|
||||
#ifndef CONFIG_CDCSER_EPINTIN_FSSIZE
|
||||
# define CONFIG_CDCSER_EPINTIN_FSSIZE 8
|
||||
# define CONFIG_CDCSER_EPINTIN_FSSIZE 64
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_CDCSER_EPINTIN_HSSIZE
|
||||
# define CONFIG_CDCSER_EPINTIN_HSSIZE 8
|
||||
# define CONFIG_CDCSER_EPINTIN_HSSIZE 64
|
||||
#endif
|
||||
|
||||
/* Endpoint number and size (in bytes) of the CDC device-to-host (IN) data
|
||||
|
|
Loading…
Reference in New Issue