diff options
| author | hathach <[email protected]> | 2021-04-06 01:00:00 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-04-06 01:00:00 +0700 |
| commit | 3acf0c2d73defdc92de02db2456591b8a441a2e0 (patch) | |
| tree | 2794102f9dc2ef349ae97a256f89af3105390e6c /src | |
| parent | 69ad092fceb635062c20bef5bd03e325a1a5d59a (diff) | |
revert dcd_edpt_xfer_fifo() implementation for esp32s2
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/espressif/esp32s2/dcd_esp32s2.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/portable/espressif/esp32s2/dcd_esp32s2.c b/src/portable/espressif/esp32s2/dcd_esp32s2.c index 28a3bcd07..edbc872fe 100644 --- a/src/portable/espressif/esp32s2/dcd_esp32s2.c +++ b/src/portable/espressif/esp32s2/dcd_esp32s2.c @@ -60,7 +60,7 @@ typedef struct { uint8_t *buffer; - tu_fifo_t * ff; + // tu_fifo_t * ff; // TODO support dcd_edpt_xfer_fifo API uint16_t total_len; uint16_t queued_len; uint16_t max_size; @@ -321,7 +321,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to xfer_ctl_t * xfer = XFER_CTL_BASE(epnum, dir); xfer->buffer = buffer; - xfer->ff = NULL; + // xfer->ff = NULL; // TODO support dcd_edpt_xfer_fifo API xfer->total_len = total_bytes; xfer->queued_len = 0; xfer->short_packet = false; @@ -357,6 +357,7 @@ bool dcd_edpt_xfer(uint8_t rhport, uint8_t ep_addr, uint8_t *buffer, uint16_t to return true; } +#if 0 // TODO support dcd_edpt_xfer_fifo API bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16_t total_bytes) { (void)rhport; @@ -404,6 +405,7 @@ bool dcd_edpt_xfer_fifo (uint8_t rhport, uint8_t ep_addr, tu_fifo_t * ff, uint16 } return true; } +#endif void dcd_edpt_stall(uint8_t rhport, uint8_t ep_addr) { @@ -514,12 +516,14 @@ static void receive_packet(xfer_ctl_t *xfer, /* usb_out_endpoint_t * out_ep, */ } // Common buffer read +#if 0 // TODO support dcd_edpt_xfer_fifo API if (xfer->ff) { // Ring buffer tu_fifo_write_n_const_addr_full_words(xfer->ff, (const void *) rx_fifo, to_recv_size); } else +#endif { uint8_t to_recv_rem = to_recv_size % 4; uint16_t to_recv_size_aligned = to_recv_size - to_recv_rem; @@ -571,11 +575,13 @@ static void transmit_packet(xfer_ctl_t *xfer, volatile usb_in_endpoint_t *in_ep, uint16_t to_xfer_size = (remaining > xfer->max_size) ? xfer->max_size : remaining; +#if 0 // TODO support dcd_edpt_xfer_fifo API if (xfer->ff) { tu_fifo_read_n_const_addr_full_words(xfer->ff, (void *) tx_fifo, to_xfer_size); } else +#endif { uint8_t to_xfer_rem = to_xfer_size % 4; uint16_t to_xfer_size_aligned = to_xfer_size - to_xfer_rem; |
