diff options
| author | hathach <[email protected]> | 2021-04-04 21:33:19 +0700 |
|---|---|---|
| committer | hathach <[email protected]> | 2021-04-04 21:33:19 +0700 |
| commit | 586a46c7d3991b28f9a0a8769c90c4992fcc1539 (patch) | |
| tree | 7e36ef2d35662d745903d4f7511ad5fac1e8a280 /src | |
| parent | 1ac9e7e3a70b48e73f150d1e7494eaecd2d34822 (diff) | |
revert dcd_edpt_xfer_fifo() implementation for samg
samg fifo is accessed byte by byte (although the register is 32 bit).
Diffstat (limited to 'src')
| -rw-r--r-- | src/portable/microchip/samg/dcd_samg.c | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/portable/microchip/samg/dcd_samg.c b/src/portable/microchip/samg/dcd_samg.c index 8b5bebf85..f8b204508 100644 --- a/src/portable/microchip/samg/dcd_samg.c +++ b/src/portable/microchip/samg/dcd_samg.c @@ -297,34 +297,13 @@ bool dcd_edpt_xfer (uint8_t rhport, uint8_t ep_addr, uint8_t * buffer, uint16_t 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; - - uint8_t const epnum = tu_edpt_number(ep_addr); - uint8_t const dir = tu_edpt_dir(ep_addr); - - xfer_desc_t* xfer = &_dcd_xfer[epnum]; - xfer->total_len = total_bytes; - xfer->actual_len = 0; - xfer->buffer = NULL; // Indicates a FIFO shall be used - xfer->ff = ff; - - if (dir == TUSB_DIR_OUT) - { - // Enable interrupt when starting OUT transfer - if (epnum != 0) UDP->UDP_IER |= (1 << epnum); - } - else - { - tu_fifo_read_n(ff, (void *) &UDP->UDP_FDR[epnum], xfer_packet_len(xfer)); - - // TX ready for transfer - csr_set(epnum, UDP_CSR_TXPKTRDY_Msk); - } - return true; } +#endif // Stall endpoint void dcd_edpt_stall (uint8_t rhport, uint8_t ep_addr) @@ -435,11 +414,13 @@ void dcd_int_handler(uint8_t rhport) if (xact_len) { // write to EP fifo +#if 0 // TODO support dcd_edpt_xfer_fifo if (xfer->ff) { tu_fifo_read_n_const_addr_full_words(xfer->ff, (void *) &UDP->UDP_FDR[epnum], xact_len); } else +#endif { xact_ep_write(epnum, xfer->buffer, xact_len); } @@ -468,11 +449,13 @@ void dcd_int_handler(uint8_t rhport) uint16_t const xact_len = (uint16_t) ((UDP->UDP_CSR[epnum] & UDP_CSR_RXBYTECNT_Msk) >> UDP_CSR_RXBYTECNT_Pos); // Read from EP fifo +#if 0 // TODO support dcd_edpt_xfer_fifo API if (xfer->ff) { tu_fifo_write_n_const_addr_full_words(xfer->ff, (const void *) &UDP->UDP_FDR[epnum], xact_len); } else +#endif { xact_ep_read(epnum, xfer->buffer, xact_len); } |
