From 72f62dcd821d84b43dab9dcd3bd747ea95c1a0b6 Mon Sep 17 00:00:00 2001 From: Hanya Date: Wed, 22 Sep 2021 22:09:41 +0900 Subject: [PATCH] Fix wrong size passed to calculate buffer offset --- os/hal/ports/RP/LLD/USBDv1/hal_usb_lld.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/os/hal/ports/RP/LLD/USBDv1/hal_usb_lld.c b/os/hal/ports/RP/LLD/USBDv1/hal_usb_lld.c index c0da9c322d..d5419776f0 100644 --- a/os/hal/ports/RP/LLD/USBDv1/hal_usb_lld.c +++ b/os/hal/ports/RP/LLD/USBDv1/hal_usb_lld.c @@ -732,7 +732,7 @@ void usb_lld_init_endpoint(USBDriver *usbp, usbep_t ep) { } else { buf_size = 64; } - buf_offset = usb_buffer_next_offset(usbp, buf_offset, false); + buf_offset = usb_buffer_next_offset(usbp, buf_size, false); epcp->out_state->hw_buf = (uint8_t*)&USB_DPSRAM->DATA[buf_offset]; epcp->out_state->buf_size = buf_size;