Close all EPs upon reset

This commit is contained in:
Yunhao Tian 2021-12-05 18:08:01 +08:00
parent fa0e4d91f9
commit 64b81fd4d3
1 changed files with 1 additions and 0 deletions

View File

@ -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));