Skip to content

Commit 15a02d0

Browse files
committed
fix incorrect rx buf in cdc
1 parent 2777df4 commit 15a02d0

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/class/cdc/cdc_device.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ bool cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_
432432
// Received new data
433433
if ( ep_addr == p_cdc->ep_out )
434434
{
435-
tu_fifo_write_n(&p_cdc->rx_ff, &p_cdc->epout_buf, (uint16_t) xferred_bytes);
435+
tu_fifo_write_n(&p_cdc->rx_ff, p_cdc->epout_buf, (uint16_t) xferred_bytes);
436436

437437
// Check for wanted char and invoke callback if needed
438438
if ( tud_cdc_rx_wanted_cb && (((signed char) p_cdc->wanted_char) != -1) )

src/class/cdc/cdc_device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ TU_ATTR_WEAK void tud_cdc_rx_cb(uint8_t itf);
134134
// Invoked when received `wanted_char`
135135
TU_ATTR_WEAK void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char);
136136

137-
// Invoked when space becomes available in TX buffer
137+
// Invoked when a TX is complete and therefore space becomes available in TX buffer
138138
TU_ATTR_WEAK void tud_cdc_tx_complete_cb(uint8_t itf);
139139

140140
// Invoked when line state DTR & RTS are changed via SET_CONTROL_LINE_STATE

0 commit comments

Comments
 (0)