summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorhathach <[email protected]>2026-01-01 12:51:05 +0700
committerhathach <[email protected]>2026-01-01 12:51:05 +0700
commit9ab605ef0b7402e72f9540d4b54af607d60cfd7a (patch)
tree63c60876da6833d6339c7c361e246e2bf807cd63 /src/portable
parent009750c747ff1d5a25d976de9161b974eb5f18e7 (diff)
change signature of tu_hwfifo_* to have hwfifo as first parameter
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c4
-rw-r--r--src/portable/synopsys/dwc2/dcd_dwc2.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
index dae921049..fe4f649da 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
@@ -324,7 +324,7 @@ static void handle_ctr_rx(uint32_t ep_id) {
fsdev_pma_buf_t *pma_buf = PMA_BUF_AT(pma_addr);
if (xfer->ff) {
- tu_hwfifo_read_to_fifo(xfer->ff, (void *)pma_buf, rx_count);
+ tu_hwfifo_read_to_fifo(pma_buf, xfer->ff, rx_count);
} else {
tu_hwfifo_read(pma_buf, xfer->buffer + xfer->queued_len, rx_count);
}
@@ -722,7 +722,7 @@ static void dcd_transmit_packet(xfer_ctl_t *xfer, uint16_t ep_ix) {
fsdev_pma_buf_t *pma_buf = PMA_BUF_AT(addr_ptr);
if (xfer->ff) {
- tu_hwfifo_write_from_fifo(xfer->ff, (void *)(uintptr_t)pma_buf, len);
+ tu_hwfifo_write_from_fifo(pma_buf, xfer->ff, len);
} else {
tu_hwfifo_write(pma_buf, &(xfer->buffer[xfer->queued_len]), len);
}
diff --git a/src/portable/synopsys/dwc2/dcd_dwc2.c b/src/portable/synopsys/dwc2/dcd_dwc2.c
index ea952dbcc..b44b8b56e 100644
--- a/src/portable/synopsys/dwc2/dcd_dwc2.c
+++ b/src/portable/synopsys/dwc2/dcd_dwc2.c
@@ -367,7 +367,7 @@ static uint16_t epin_write_tx_fifo(dwc2_regs_t *dwc2, uint8_t epnum) {
// Push packet to Tx-FIFO
if (xfer->ff) {
volatile uint32_t* tx_fifo = dwc2->fifo[epnum];
- tu_hwfifo_write_from_fifo(xfer->ff, (void *)(uintptr_t)tx_fifo, xact_bytes);
+ tu_hwfifo_write_from_fifo(tx_fifo, xfer->ff, xact_bytes);
total_bytes_written += xact_bytes;
} else {
dfifo_write_packet(dwc2, epnum, xfer->buffer, xact_bytes);
@@ -889,7 +889,7 @@ static void handle_rxflvl_irq(uint8_t rhport) {
if (byte_count != 0) {
// Read packet off RxFIFO
if (xfer->ff != NULL) {
- tu_hwfifo_read_to_fifo(xfer->ff, (const void *)(uintptr_t)rx_fifo, byte_count);
+ tu_hwfifo_read_to_fifo(rx_fifo, xfer->ff, byte_count);
} else {
dfifo_read_packet(dwc2, xfer->buffer, byte_count);
xfer->buffer += byte_count;