summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYunhao Tian <[email protected]>2021-12-05 18:08:01 +0800
committerYunhao Tian <[email protected]>2021-12-05 18:08:01 +0800
commit64b81fd4d316ff8e0390c843bdff236ed4151147 (patch)
treed6dfe3f40877d09a7c291e0785eb2a0f59f5e746
parentfa0e4d91f9e22b8c7b8f561fe225116b5f6a14a5 (diff)
Close all EPs upon reset
-rw-r--r--src/portable/sunxi/dcd_sunxi_musb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/portable/sunxi/dcd_sunxi_musb.c b/src/portable/sunxi/dcd_sunxi_musb.c
index 0bb031a80..2150403a9 100644
--- a/src/portable/sunxi/dcd_sunxi_musb.c
+++ b/src/portable/sunxi/dcd_sunxi_musb.c
@@ -839,6 +839,7 @@ void dcd_init(uint8_t rhport)
USBC_ForceIdToHigh(); // Force device mode
USBC_ForceVbusValidToHigh();
USBC_SelectBus(USBC_IO_TYPE_PIO, 0, 0);
+ dcd_edpt_close_all(rhport);
#if TUD_OPT_HIGH_SPEED
USBC_REG_set_bit_b(USBC_BP_POWER_D_HIGH_SPEED_EN, USBC_REG_PCTL(USBC0_BASE));