cdcacm: Add cdcacm bulkout request buffer config
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
c16fd8c911
commit
1a69d3c6ee
@ -649,6 +649,14 @@ config CDCACM_NWRREQS
|
||||
---help---
|
||||
The number of write/read requests that can be in flight
|
||||
|
||||
config CDCACM_BULKOUT_REQLEN
|
||||
int "Size of one read request buffer"
|
||||
default 512 if USBDEV_DUALSPEED
|
||||
default 256 if !USBDEV_DUALSPEED
|
||||
---help---
|
||||
Read buffer size maybe larger than the maxpacket size. Increasing
|
||||
the buffer size can effectively improve the transmission speed.
|
||||
|
||||
config CDCACM_BULKIN_REQLEN
|
||||
int "Size of one write request buffer"
|
||||
default 768 if USBDEV_DUALSPEED
|
||||
|
@ -626,7 +626,7 @@ static int cdcacm_requeue_rdrequest(FAR struct cdcacm_dev_s *priv,
|
||||
/* Requeue the read request */
|
||||
|
||||
ep = priv->epbulkout;
|
||||
req->len = ep->maxpacket;
|
||||
req->len = MAX(CONFIG_CDCACM_BULKOUT_REQLEN, ep->maxpacket);
|
||||
ret = EP_SUBMIT(ep, req);
|
||||
if (ret != OK)
|
||||
{
|
||||
@ -1334,6 +1334,11 @@ static int cdcacm_bind(FAR struct usbdevclass_driver_s *driver,
|
||||
reqlen = CONFIG_CDCACM_EPBULKOUT_FSSIZE;
|
||||
}
|
||||
|
||||
if (CONFIG_CDCACM_BULKOUT_REQLEN > reqlen)
|
||||
{
|
||||
reqlen = CONFIG_CDCACM_BULKOUT_REQLEN;
|
||||
}
|
||||
|
||||
for (i = 0; i < CONFIG_CDCACM_NRDREQS; i++)
|
||||
{
|
||||
rdcontainer = &priv->rdreqs[i];
|
||||
|
Loading…
Reference in New Issue
Block a user