File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
subsys/usb/device_next/class Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,16 @@ config USBD_CDC_ACM_BUF_POOL
3737 ACM instances and the size of the bulk endpoints. When disabled, the
3838 implementation uses the UDC driver's pool.
3939
40+ config USBD_CDC_ACM_BUF_POOL_SIZE
41+ int "Size of the buffers in the dedicated buffer pool"
42+ depends on USBD_CDC_ACM_BUF_POOL
43+ default 512 if USBD_MAX_SPEED_HIGH
44+ default 64 if USBD_MAX_SPEED_FULL
45+ help
46+ Increasing the size of buffers past the endpoint size can reduce the
47+ number of round trips through the CDC ACM class when the TX FIFO is larger,
48+ than the endpoint size, increasing throughput.
49+
4050module = USBD_CDC_ACM
4151module-str = usbd cdc_acm
4252default-count = 1
Original file line number Diff line number Diff line change @@ -132,7 +132,8 @@ static void cdc_acm_irq_rx_enable(const struct device *dev);
132132#if CONFIG_USBD_CDC_ACM_BUF_POOL
133133UDC_BUF_POOL_DEFINE (cdc_acm_ep_pool ,
134134 DT_NUM_INST_STATUS_OKAY (DT_DRV_COMPAT ) * 2 ,
135- USBD_MAX_BULK_MPS , sizeof (struct udc_buf_info ), NULL );
135+ CONFIG_USBD_CDC_ACM_BUF_POOL_SIZE , sizeof (struct udc_buf_info ),
136+ NULL );
136137
137138static struct net_buf * cdc_acm_buf_alloc (struct usbd_class_data * const c_data ,
138139 const uint8_t ep , size_t size_hint )
You can’t perform that action at this time.
0 commit comments