Skip to content

Commit 86d6f5a

Browse files
authored
Merge upstream changes
Upstream sync
2 parents d41d2ac + 2f05309 commit 86d6f5a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/stm32/usbotg.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,8 @@ usb_send_bulk_in(void *data, uint_fast8_t len)
242242
usb_irq_enable();
243243
return len;
244244
}
245-
if (ctl & USB_OTG_DIEPCTL_EPENA) {
245+
int dbuf_busy = CONFIG_STM32_USB_DOUBLE_BUFFER_TX && TX_BUF.len;
246+
if (ctl & USB_OTG_DIEPCTL_EPENA || dbuf_busy) {
246247
if (!CONFIG_STM32_USB_DOUBLE_BUFFER_TX || TX_BUF.len || !len) {
247248
// Wait for space to transmit
248249
OTGD->DAINTMSK |= 1 << USB_CDC_EP_BULK_IN;

0 commit comments

Comments
 (0)