Skip to content

Commit

Permalink
Fix bad define usage
Browse files Browse the repository at this point in the history
  • Loading branch information
RockyZeroFour committed Dec 28, 2023
1 parent 0bd4978 commit b5f352e
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions src/portable/synopsys/dwc2/dcd_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -387,17 +387,19 @@ static void reset_core(dwc2_regs_t * dwc2)
}

static uint32_t get_hs_phy_type(dwc2_regs_t * dwc2) {
#ifdef OPT_MCU_GD32F4
#if TU_CHECK_MCU(OPT_MCU_GD32F4)

#ifdef USE_ULPI_PHY
return HS_PHY_TYPE_ULPI;
#elif defined(USE_EMBEDDED_PHY)
// TODO: Is this correct?
return HS_PHY_TYPE_NONE;
#endif
#if defined(USE_ULPI_PHY)
return HS_PHY_TYPE_ULPI;
#elif defined(USE_EMBEDDED_PHY)
// TODO: Is this correct?
return HS_PHY_TYPE_NONE;
#else
#error "Unsupported PHY option"
#endif

#else
return dwc2->ghwcfg2_bm.hs_phy_type;
return dwc2->ghwcfg2_bm.hs_phy_type;
#endif
}

Expand Down

0 comments on commit b5f352e

Please sign in to comment.