From 53287ae73e89a816fc19ed0c2d22a675cd2af9a0 Mon Sep 17 00:00:00 2001 From: bkleiner Date: Sun, 22 Oct 2023 01:36:33 +0200 Subject: [PATCH] at32: remove duplicated send --- src/driver/at32/usb.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/driver/at32/usb.c b/src/driver/at32/usb.c index a47a40d62..ea4450919 100644 --- a/src/driver/at32/usb.c +++ b/src/driver/at32/usb.c @@ -68,8 +68,6 @@ void usb_cdc_tx_handler() { static uint8_t buf[USBD_CDC_OUT_MAXPACKET_SIZE]; const uint32_t len = ring_buffer_read_multi(&usb_tx_buffer, buf, USBD_CDC_OUT_MAXPACKET_SIZE); - usb_vcp_send_data(&otg_core_struct.dev, buf, len); - if (len) { usb_vcp_send_data(&otg_core_struct.dev, buf, len); tx_stalled = false; @@ -96,7 +94,7 @@ void usb_cdc_kickoff_tx() { return; } - usb_vcp_send_data(&otg_core_struct.dev, 0, 0); + usb_cdc_tx_handler(); } uint32_t usb_serial_read(uint8_t *data, uint32_t len) {