summaryrefslogtreecommitdiff
path: root/src/class/cdc
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-11-27 23:52:51 +0700
committerGitHub <[email protected]>2025-11-27 23:52:51 +0700
commit1618c58dc4ef82f30c51c6318046d8dccb524425 (patch)
treee9f94209538f155544d3432496729c47f1350ef0 /src/class/cdc
parent5ef55bfa30d6f8cf175b3d327f621c76aae7b138 (diff)
parent6e9e9ce9d19d6aa30c69c6e6c82d09dde619f391 (diff)
Merge pull request #3373 from hathach/vendor-dedicated-hwfifo
update Vendor device to omit ep buffer for port with dedicated hwfifo
Diffstat (limited to 'src/class/cdc')
-rw-r--r--src/class/cdc/cdc_device.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/class/cdc/cdc_device.c b/src/class/cdc/cdc_device.c
index 7ef8aa738..d7792afe4 100644
--- a/src/class/cdc/cdc_device.c
+++ b/src/class/cdc/cdc_device.c
@@ -266,9 +266,8 @@ void cdcd_init(void) {
uint8_t *epout_buf = NULL;
uint8_t *epin_buf = NULL;
#else
- cdcd_epbuf_t *p_epbuf = &_cdcd_epbuf[i];
- uint8_t *epout_buf = p_epbuf->epout;
- uint8_t *epin_buf = p_epbuf->epin;
+ uint8_t *epout_buf = _cdcd_epbuf[i].epout;
+ uint8_t *epin_buf = _cdcd_epbuf[i].epin;
#endif
tu_edpt_stream_init(&p_cdc->stream.rx, false, false, false, p_cdc->stream.rx_ff_buf, CFG_TUD_CDC_RX_BUFSIZE,
@@ -516,11 +515,9 @@ bool cdcd_xfer_cb(uint8_t rhport, uint8_t ep_addr, xfer_result_t result, uint32_
}
// Data sent to host, we continue to fetch from tx fifo to send.
- // Note: This will cause incorrect baudrate set in line coding.
- // Though maybe the baudrate is not really important !!!
+ // Note: This will cause incorrect baudrate set in line coding. Though maybe the baudrate is not really important !
if (ep_addr == stream_tx->ep_addr) {
- // invoke transmit callback to possibly refill tx fifo
- tud_cdc_tx_complete_cb(itf);
+ tud_cdc_tx_complete_cb(itf); // invoke callback to possibly refill tx fifo
if (0 == tu_edpt_stream_write_xfer(rhport, stream_tx)) {
// If there is no data left, a ZLP should be sent if needed