summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMasterPhi <[email protected]>2021-07-21 10:50:07 +0200
committerMasterPhi <[email protected]>2021-07-21 10:50:07 +0200
commit8c6cd5396c1276aed12fd3a74825debe136d3ded (patch)
treeeea922245e4286a3e6fb28d38871cf88f99106c8 /src
parent5492d9148cbd09d19137b992f9ee51def9bd076f (diff)
Fix non-DMA IN irq.
Diffstat (limited to 'src')
-rw-r--r--src/portable/microchip/samx7x/dcd_samx7x.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/portable/microchip/samx7x/dcd_samx7x.c b/src/portable/microchip/samx7x/dcd_samx7x.c
index 851978398..e35cf80a6 100644
--- a/src/portable/microchip/samx7x/dcd_samx7x.c
+++ b/src/portable/microchip/samx7x/dcd_samx7x.c
@@ -326,6 +326,8 @@ static void dcd_ep_handler(uint8_t ep_ix)
{
// TX complete
dcd_event_xfer_complete(0, 0x80 + ep_ix, xfer->total_len, XFER_RESULT_SUCCESS, true);
+ // Disable the interrupt
+ USBHS->USBHS_DEVEPTIDR[ep_ix] = USBHS_DEVEPTIDR_TXINEC;
}
}
}
@@ -576,12 +578,12 @@ static void dcd_transmit_packet(xfer_ctl_t * xfer, uint8_t ep_ix)
{
// Control endpoint: clear the interrupt flag to send the data
USBHS->USBHS_DEVEPTICR[0] = USBHS_DEVEPTICR_TXINIC;
- USBHS->USBHS_DEVEPTIER[0] = USBHS_DEVEPTIER_TXINES;
} else
{
// Other endpoint types: clear the FIFO control flag to send the data
USBHS->USBHS_DEVEPTIDR[ep_ix] = USBHS_DEVEPTIDR_FIFOCONC;
}
+ USBHS->USBHS_DEVEPTIER[ep_ix] = USBHS_DEVEPTIER_TXINES;
}
// Submit a transfer, When complete dcd_event_xfer_complete() is invoked to notify the stack