Skip to content

Commit

Permalink
#135 revert clear STALL on write
Browse files Browse the repository at this point in the history
  • Loading branch information
dmitrystu committed May 26, 2024
1 parent 823c025 commit 7d4b81f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/usbd_stm32f429_otgfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,8 @@ static int32_t ep_write(uint8_t ep, const void *buf, uint16_t blen) {
len = (blen + 3) >> 2;
/* no enough space in TX fifo */
if (len > 0 && len > _FLD2VAL(USB_OTG_DTXFSTS_INEPTFSAV, epi->DTXFSTS)) return -1;
//epi->DIEPTSIZ = 0;
epi->DIEPTSIZ = (1 << 19) + blen;
_BST(epi->DIEPCTL, USB_OTG_DIEPCTL_EPENA | USB_OTG_DIEPCTL_CNAK);
_BMD(epi->DIEPCTL, USB_OTG_DIEPCTL_STALL, USB_OTG_DOEPCTL_EPENA | USB_OTG_DOEPCTL_CNAK);
/* push data to FIFO */
for (int idx = 0; idx < blen; idx++) {
tmp |= (uint32_t)((const uint8_t*)buf)[idx] << ((idx & 0x03) << 3);
Expand Down

0 comments on commit 7d4b81f

Please sign in to comment.