Skip to content

Commit

Permalink
at32: remove duplicated send
Browse files Browse the repository at this point in the history
  • Loading branch information
bkleiner committed Oct 21, 2023
1 parent 7b113e5 commit 1e64fd2
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/driver/at32/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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) {
Expand Down

0 comments on commit 1e64fd2

Please sign in to comment.