summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHa Thach <[email protected]>2021-08-31 17:00:42 +0700
committerGitHub <[email protected]>2021-08-31 17:00:42 +0700
commite2175f6ed1e9a42c76dacf345d51ba61eecd8a6a (patch)
treeca9926ad4a3f6c91579ec0890c055c91283eb94d /src
parent1a1bcd816ce1c91aa41635d33ee12632dc0b3d9e (diff)
parent76345ea3a1d78924585b8c4e0c5b5cb5e89d74e7 (diff)
Merge pull request #1061 from hathach/samd-compliance
Update SAMD to pass USBCV
Diffstat (limited to 'src')
-rw-r--r--src/portable/microchip/samd/dcd_samd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/portable/microchip/samd/dcd_samd.c b/src/portable/microchip/samd/dcd_samd.c
index 54e8e62d9..526a6fb63 100644
--- a/src/portable/microchip/samd/dcd_samd.c
+++ b/src/portable/microchip/samd/dcd_samd.c
@@ -230,10 +230,12 @@ bool dcd_edpt_open (uint8_t rhport, tusb_desc_endpoint_t const * desc_edpt)
if ( dir == TUSB_DIR_OUT )
{
ep->EPCFG.bit.EPTYPE0 = desc_edpt->bmAttributes.xfer + 1;
+ ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ0 | USB_DEVICE_EPSTATUSCLR_DTGLOUT; // clear stall & dtoggle
ep->EPINTENSET.bit.TRCPT0 = true;
}else
{
ep->EPCFG.bit.EPTYPE1 = desc_edpt->bmAttributes.xfer + 1;
+ ep->EPSTATUSCLR.reg = USB_DEVICE_EPSTATUSCLR_STALLRQ1 | USB_DEVICE_EPSTATUSCLR_DTGLIN; // clear stall & dtoggle
ep->EPINTENSET.bit.TRCPT1 = true;
}