summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2025-11-24 18:05:46 +0700
committerGitHub <[email protected]>2025-11-24 18:05:46 +0700
commitfee2d2a034d65aa625bc1a8b32c3b7a51292a39f (patch)
tree9f68d143854878f2ca9612a3dfa7e7042093fec5
parent0f1b2498711b2a2608a42ac88e971c5b93832c86 (diff)
parent50a7d923dd66cbb996c5587db4821fc52a307902 (diff)
Merge pull request #3360 from Milek7/sb-ep-fix-pr
stm32_fsdev: Fix missed cases in single-buffered isochronous endpoint support.
-rw-r--r--src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
index 381aa0b40..6276f0f07 100644
--- a/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
+++ b/src/portable/st/stm32_fsdev/dcd_stm32_fsdev.c
@@ -293,7 +293,11 @@ static void handle_ctr_tx(uint32_t ep_id) {
return;
}
xfer->iso_in_sending = false;
+#if FSDEV_USE_SBUF_ISO == 0
uint8_t buf_id = (ep_reg & USB_EP_DTOG_TX) ? 0 : 1;
+#else
+ uint8_t buf_id = BTABLE_BUF_TX;
+#endif
btable_set_count(ep_id, buf_id, 0);
}
@@ -774,7 +778,12 @@ static bool edpt_xfer(uint8_t rhport, uint8_t ep_num, tusb_dir_t dir) {
uint16_t cnt = tu_min16(xfer->total_len, xfer->max_packet_size);
- if (ep_is_iso(ep_reg)) {
+#if FSDEV_USE_SBUF_ISO == 0
+ bool const dbl_buf = ep_is_iso(ep_reg);
+#else
+ bool const dbl_buf = false;
+#endif
+ if (dbl_buf) {
btable_set_rx_bufsize(ep_idx, 0, cnt);
btable_set_rx_bufsize(ep_idx, 1, cnt);
} else {