diff options
| author | StackYuan <[email protected]> | 2024-03-19 18:41:56 +0800 |
|---|---|---|
| committer | Meco Man <[email protected]> | 2024-03-19 08:13:00 -0400 |
| commit | a582c0cc3133e6f317d93f921c7178ccf5ea3e95 (patch) | |
| tree | dbc76aca8bb22cb6f298d76de9ba0f62cab8a9de /components | |
| parent | 8120fa5e31a6d3e488a640f0704b795b557008f7 (diff) | |
[fix] NXP bsp for RT-Thread 5.1.0 fixed up.
Diffstat (limited to 'components')
| -rw-r--r-- | components/drivers/usb/usbdevice/class/cdc_vcom.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/components/drivers/usb/usbdevice/class/cdc_vcom.c b/components/drivers/usb/usbdevice/class/cdc_vcom.c index b513394364..dec102b135 100644 --- a/components/drivers/usb/usbdevice/class/cdc_vcom.c +++ b/components/drivers/usb/usbdevice/class/cdc_vcom.c @@ -756,9 +756,9 @@ static rt_ssize_t _vcom_rb_block_put(struct vcom *data, const rt_uint8_t *buf, r } #ifdef RT_USING_SERIAL_V1 -static rt_size_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, int direction) +static rt_ssize_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, int direction) #else -static rt_size_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, rt_uint32_t tx_flag) +static rt_ssize_t _vcom_tx(struct rt_serial_device *serial, rt_uint8_t *buf, rt_size_t size, rt_uint32_t tx_flag) #endif { struct ufunction *func; @@ -893,18 +893,16 @@ static void vcom_tx_thread_entry(void* parameter) } if (!data->connected) { - if(data->serial.parent.open_flag & #ifdef RT_USING_SERIAL_V1 #ifndef VCOM_TX_USE_DMA - RT_DEVICE_FLAG_INT_TX + if(data->serial.parent.open_flag & RT_DEVICE_FLAG_INT_TX) #else - RT_DEVICE_FLAG_DMA_TX + if(data->serial.parent.open_flag & RT_DEVICE_FLAG_DMA_TX) #endif #endif #ifdef RT_USING_SERIAL_V2 - RT_DEVICE_FLAG_TX_BLOCKING + if(data->serial.parent.open_flag & RT_DEVICE_FLAG_TX_BLOCKING) #endif - ) { /* drop msg */ #ifndef VCOM_TX_USE_DMA @@ -927,18 +925,16 @@ static void vcom_tx_thread_entry(void* parameter) { LOG_D("vcom tx timeout"); } - if(data->serial.parent.open_flag & #ifdef RT_USING_SERIAL_V1 #ifndef VCOM_TX_USE_DMA - RT_DEVICE_FLAG_INT_TX + if(data->serial.parent.open_flag & RT_DEVICE_FLAG_INT_TX) #else - RT_DEVICE_FLAG_DMA_TX + if(data->serial.parent.open_flag & RT_DEVICE_FLAG_DMA_TX) #endif #endif #ifdef RT_USING_SERIAL_V2 - RT_DEVICE_FLAG_TX_BLOCKING + if(data->serial.parent.open_flag & RT_DEVICE_FLAG_TX_BLOCKING) #endif - ) { #ifndef VCOM_TX_USE_DMA rt_hw_serial_isr(&data->serial,RT_SERIAL_EVENT_TX_DONE); |
