mirror of
https://github.com/hathach/tinyusb.git
synced 2025-03-14 04:18:56 +00:00
clean up
This commit is contained in:
parent
12e96ce571
commit
301d6b4133
@ -443,11 +443,15 @@ static void phy_hs_init(dwc2_regs_t * dwc2)
|
||||
dwc2_phy_update(dwc2, dwc2->ghwcfg2_bm.hs_phy_type);
|
||||
|
||||
// Set max speed
|
||||
dwc2->dcfg = (dwc2->dcfg & ~DCFG_DSPD_Msk) | (DCFG_DSPD_HS << DCFG_DSPD_Pos);
|
||||
uint32_t dcfg = dwc2->dcfg;
|
||||
dcfg &= ~DCFG_DSPD_Msk;
|
||||
dcfg |= DCFG_DSPD_HS << DCFG_DSPD_Pos;
|
||||
|
||||
// XCVRDLY: transceiver delay between xcvr_sel and txvalid during device chirp is required
|
||||
// when using with some PHYs such as USB334x (USB3341, USB3343, USB3346, USB3347)
|
||||
if (dwc2->ghwcfg2_bm.hs_phy_type == HS_PHY_TYPE_ULPI) dwc2->dcfg |= DCFG_XCVRDLY;
|
||||
if (dwc2->ghwcfg2_bm.hs_phy_type == HS_PHY_TYPE_ULPI) dcfg |= DCFG_XCVRDLY;
|
||||
|
||||
dwc2->dcfg = dcfg;
|
||||
}
|
||||
|
||||
static bool check_dwc2(dwc2_regs_t * dwc2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user