Fix wrong size passed to calculate buffer offset

This commit is contained in:
Hanya 2021-09-22 22:09:41 +09:00
parent f3c9ee772a
commit 72f62dcd82
1 changed files with 1 additions and 1 deletions

View File

@ -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;