summaryrefslogtreecommitdiff
path: root/components/drivers/usb/usbdevice
diff options
context:
space:
mode:
authorPeter Zhang <[email protected]>2018-10-26 14:29:22 +0800
committerPeter Zhang <[email protected]>2018-10-26 14:29:22 +0800
commit328a697c1d386fc2e5f5463382a2d024f5233380 (patch)
tree2c55681848d561dba2091a438771b0a633b4762b /components/drivers/usb/usbdevice
parentf97e19c509c7cab61a402e9932fef26c17d64557 (diff)
[components][drivers][usb][usb_device][cdc_vcom]: Add 'RT_VCOM_TX_TIMEOUT' to configure TX_TIMEOUT whick may block vcom tx thread for a long time. Add 'RT_VCOM_TASK_STK_SIZE', 'RT_VCOM_TX_USE_DMA', 'RT_VCOM_SERNO', 'RT_VCOM_SER_LEN', 'RT_VCOM_TX_TIMEOUT' to Kconfig
Diffstat (limited to 'components/drivers/usb/usbdevice')
-rw-r--r--components/drivers/usb/usbdevice/class/cdc_vcom.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c
index c83043314e..336cfcb152 100644
--- a/components/drivers/usb/usbdevice/class/cdc_vcom.c
+++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c
@@ -22,7 +22,12 @@
#ifdef RT_USB_DEVICE_CDC
-#define TX_TIMEOUT 1000
+#ifdef RT_VCOM_TX_TIMEOUT
+#define VCOM_TX_TIMEOUT RT_VCOM_TX_TIMEOUT
+#else /*!RT_VCOM_TX_TIMEOUT*/
+#define VCOM_TX_TIMEOUT 1000
+#endif /*RT_VCOM_TX_TIMEOUT*/
+
#define CDC_RX_BUFSIZE 128
#define CDC_MAX_PACKET_SIZE 64
#define VCOM_DEVICE "vcom"
@@ -880,7 +885,7 @@ static void vcom_tx_thread_entry(void* parameter)
rt_usbd_io_request(func->device, data->ep_in, &data->ep_in->request);
- if (rt_completion_wait(&data->wait, TX_TIMEOUT) != RT_EOK)
+ if (rt_completion_wait(&data->wait, VCOM_TX_TIMEOUT) != RT_EOK)
{
RT_DEBUG_LOG(RT_DEBUG_USB, ("vcom tx timeout\n"));
}