Fix bug in writing to constant src/dst address.

Copying has to be conduct in full words (at least for STM32). Renamed
copy function to tu_fifo_write_n_const_addr_full_words()
This commit is contained in:
Reinhard Panhuber
2021-03-23 19:33:04 +01:00
parent cd491e296e
commit a60bd0c8ac
6 changed files with 149 additions and 74 deletions

View File

@@ -517,7 +517,7 @@ static void receive_packet(xfer_ctl_t *xfer, /* usb_out_endpoint_t * out_ep, */
if (xfer->ff)
{
// Ring buffer
tu_fifo_write_n_const_addr(xfer->ff, (const void *) rx_fifo, to_recv_size);
tu_fifo_write_n_const_addr_full_words(xfer->ff, (const void *) rx_fifo, to_recv_size);
}
else
{
@@ -573,7 +573,7 @@ static void transmit_packet(xfer_ctl_t *xfer, volatile usb_in_endpoint_t *in_ep,
if (xfer->ff)
{
tu_fifo_read_n_const_addr(xfer->ff, (void *) tx_fifo, to_xfer_size);
tu_fifo_read_n_const_addr_full_words(xfer->ff, (void *) tx_fifo, to_xfer_size);
}
else
{