Skip to content

Commit 50a7d92

Browse files
committed
stm32_fsdev: Fix missed cases in single-buffered isochronous endpoint support.
1 parent 0f1b249 commit 50a7d92

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,11 @@ static void handle_ctr_tx(uint32_t ep_id) {
293293
return;
294294
}
295295
xfer->iso_in_sending = false;
296+
#if FSDEV_USE_SBUF_ISO == 0
296297
uint8_t buf_id = (ep_reg & USB_EP_DTOG_TX) ? 0 : 1;
298+
#else
299+
uint8_t buf_id = BTABLE_BUF_TX;
300+
#endif
297301
btable_set_count(ep_id, buf_id, 0);
298302
}
299303

@@ -774,7 +778,12 @@ static bool edpt_xfer(uint8_t rhport, uint8_t ep_num, tusb_dir_t dir) {
774778

775779
uint16_t cnt = tu_min16(xfer->total_len, xfer->max_packet_size);
776780

777-
if (ep_is_iso(ep_reg)) {
781+
#if FSDEV_USE_SBUF_ISO == 0
782+
bool const dbl_buf = ep_is_iso(ep_reg);
783+
#else
784+
bool const dbl_buf = false;
785+
#endif
786+
if (dbl_buf) {
778787
btable_set_rx_bufsize(ep_idx, 0, cnt);
779788
btable_set_rx_bufsize(ep_idx, 1, cnt);
780789
} else {

0 commit comments

Comments
 (0)