summaryrefslogtreecommitdiff
path: root/src/portable
diff options
context:
space:
mode:
authorJerzy Kasenberg <[email protected]>2022-01-20 09:55:25 +0100
committerJerzy Kasenberg <[email protected]>2022-01-20 10:01:18 +0100
commitae4d901d8351437c499cecef349b84af4bb6c239 (patch)
tree21251748b6e5970d7c68d954f587be1fbd5a4307 /src/portable
parenta59228207999329eb16fddbeb6286dfc36f4c0bd (diff)
dcd_da1469x: Fix over-run/under-run mask
Bit mask enabling/disabling over-run/unde-run was shifted by one nibble, so interrupt was never enabled. It did not force any issue as this situation could only happen on ISO endpoints without DMA.
Diffstat (limited to 'src/portable')
-rw-r--r--src/portable/dialog/da146xx/dcd_da146xx.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/portable/dialog/da146xx/dcd_da146xx.c b/src/portable/dialog/da146xx/dcd_da146xx.c
index 311119747..5713f5cca 100644
--- a/src/portable/dialog/da146xx/dcd_da146xx.c
+++ b/src/portable/dialog/da146xx/dcd_da146xx.c
@@ -935,13 +935,13 @@ bool dcd_edpt_open(uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
if (dir == TUSB_DIR_OUT)
{
regs->epc_out = epnum | USB_USB_EPC1_REG_USB_EP_EN_Msk | iso_mask;
- USB->USB_RXMSK_REG |= 0x101 << (epnum - 1);
+ USB->USB_RXMSK_REG |= 0x11 << (epnum - 1);
REG_SET_BIT(USB_MAMSK_REG, USB_M_RX_EV);
}
else
{
regs->epc_in = epnum | USB_USB_EPC1_REG_USB_EP_EN_Msk | iso_mask;
- USB->USB_TXMSK_REG |= 0x101 << (epnum - 1);
+ USB->USB_TXMSK_REG |= 0x11 << (epnum - 1);
REG_SET_BIT(USB_MAMSK_REG, USB_M_TX_EV);
}
}
@@ -982,7 +982,7 @@ void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
{
regs->rxc = USB_USB_RXC1_REG_USB_FLUSH_Msk;
regs->epc_out = 0;
- USB->USB_RXMSK_REG &= ~(0x101 << (epnum - 1));
+ USB->USB_RXMSK_REG &= ~(0x11 << (epnum - 1));
// Release DMA if needed
if (_dcd.dma_ep[TUSB_DIR_OUT] == epnum)
{
@@ -994,7 +994,7 @@ void dcd_edpt_close(uint8_t rhport, uint8_t ep_addr)
{
regs->txc = USB_USB_TXC1_REG_USB_FLUSH_Msk;
regs->epc_in = 0;
- USB->USB_TXMSK_REG &= ~(0x101 << (epnum - 1));
+ USB->USB_TXMSK_REG &= ~(0x11 << (epnum - 1));
// Release DMA if needed
if (_dcd.dma_ep[TUSB_DIR_IN] == epnum)
{