summaryrefslogtreecommitdiff
path: root/src/portable/synopsys
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-01-03 15:37:22 +0700
committerhathach <[email protected]>2026-01-03 15:37:22 +0700
commitea23966aa785a630012097943c70d8121c5139c1 (patch)
tree37e4279eba72c578463da999f141394267ced41e /src/portable/synopsys
parente158a3dd38fccd99169a3e5b8cecf7a1ac45915e (diff)
add default access mode for tu_hwfifo API make it easier for non-custom read/write
Diffstat (limited to 'src/portable/synopsys')
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index 2309afd53..4110e1530 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -365,13 +365,12 @@ static uint16_t epin_write_tx_fifo(dwc2_regs_t *dwc2, uint8_t epnum) {
}
// Push packet to Tx-FIFO
- const tu_hwfifo_access_t access_mode = {.data_stride = CFG_TUSB_FIFO_HWFIFO_DATA_STRIDE};
volatile uint32_t *tx_fifo = dwc2->fifo[epnum];
if (xfer->ff) {
- tu_hwfifo_write_from_fifo(tx_fifo, xfer->ff, xact_bytes, &access_mode);
+ tu_hwfifo_write_from_fifo(tx_fifo, xfer->ff, xact_bytes, NULL);
total_bytes_written += xact_bytes;
} else {
- tu_hwfifo_write(tx_fifo, xfer->buffer, xact_bytes, &access_mode);
+ tu_hwfifo_write(tx_fifo, xfer->buffer, xact_bytes, NULL);
xfer->buffer += xact_bytes;
total_bytes_written += xact_bytes;
}
@@ -889,11 +888,10 @@ static void handle_rxflvl_irq(uint8_t rhport) {
if (byte_count != 0) {
// Read packet off RxFIFO
- const tu_hwfifo_access_t access_mode = {.data_stride = CFG_TUSB_FIFO_HWFIFO_DATA_STRIDE};
if (xfer->ff != NULL) {
- tu_hwfifo_read_to_fifo(rx_fifo, xfer->ff, byte_count, &access_mode);
+ tu_hwfifo_read_to_fifo(rx_fifo, xfer->ff, byte_count, NULL);
} else {
- tu_hwfifo_read(rx_fifo, xfer->buffer, byte_count, &access_mode);
+ tu_hwfifo_read(rx_fifo, xfer->buffer, byte_count, NULL);
xfer->buffer += byte_count;
}
}