mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-29 01:20:19 +00:00
fix incorrect rx buf in cdc
This commit is contained in:
parent
2777df411f
commit
15a02d04df
@ -432,7 +432,7 @@ bool cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_
|
|||||||
// Received new data
|
// Received new data
|
||||||
if ( ep_addr == p_cdc->ep_out )
|
if ( ep_addr == p_cdc->ep_out )
|
||||||
{
|
{
|
||||||
tu_fifo_write_n(&p_cdc->rx_ff, &p_cdc->epout_buf, (uint16_t) xferred_bytes);
|
tu_fifo_write_n(&p_cdc->rx_ff, p_cdc->epout_buf, (uint16_t) xferred_bytes);
|
||||||
|
|
||||||
// Check for wanted char and invoke callback if needed
|
// Check for wanted char and invoke callback if needed
|
||||||
if ( tud_cdc_rx_wanted_cb && (((signed char) p_cdc->wanted_char) != -1) )
|
if ( tud_cdc_rx_wanted_cb && (((signed char) p_cdc->wanted_char) != -1) )
|
||||||
|
@ -134,7 +134,7 @@ TU_ATTR_WEAK void tud_cdc_rx_cb(uint8_t itf);
|
|||||||
// Invoked when received `wanted_char`
|
// Invoked when received `wanted_char`
|
||||||
TU_ATTR_WEAK void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char);
|
TU_ATTR_WEAK void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char);
|
||||||
|
|
||||||
// Invoked when space becomes available in TX buffer
|
// Invoked when a TX is complete and therefore space becomes available in TX buffer
|
||||||
TU_ATTR_WEAK void tud_cdc_tx_complete_cb(uint8_t itf);
|
TU_ATTR_WEAK void tud_cdc_tx_complete_cb(uint8_t itf);
|
||||||
|
|
||||||
// Invoked when line state DTR & RTS are changed via SET_CONTROL_LINE_STATE
|
// Invoked when line state DTR & RTS are changed via SET_CONTROL_LINE_STATE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user