Skip to content

Commit a0c7b41

Browse files
authored
Update cores/esp32/HWCDC.cpp
1 parent 5000939 commit a0c7b41

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

cores/esp32/HWCDC.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,7 @@ size_t HWCDC::write(const uint8_t *buffer, size_t size)
376376
if(isConnected) usb_serial_jtag_ll_ena_intr_mask(USB_SERIAL_JTAG_INTR_SERIAL_IN_EMPTY);
377377
}
378378
}
379-
// there is no more space in CDC Endpoint FIFO. It is very possible that CDC is diconnected!
380-
// ==> flush all data from TX buffer and only keep last written data
379+
// CDC is diconnected ==> flush all data from TX buffer
381380
if(to_send && !usb_serial_jtag_ll_txfifo_writable()) {
382381
isConnected = false; // we consider that CDC connection has been terminated
383382
flushTXBuffer(); // flush TX Ringbuffer

0 commit comments

Comments
 (0)