Skip to content

Commit

Permalink
Avoid USBCDC send_nb break the continuation use case
Browse files Browse the repository at this point in the history
  • Loading branch information
cyliangtw committed Dec 13, 2023
1 parent c30af6a commit 126d767
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/source/USBCDC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ void USBCDC::send_nb(uint8_t *buffer, uint32_t size, uint32_t *actual, bool now)
uint32_t free = sizeof(_tx_buffer) - _tx_size;
uint32_t write_size = free > size ? size : free;
if (size > 0) {
memcpy(_tx_buf, buffer, write_size);
memcpy(_tx_buf + _tx_size, buffer, write_size);
}
_tx_size += write_size;
*actual = write_size;
Expand Down

0 comments on commit 126d767

Please sign in to comment.