summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorhathach <[email protected]>2020-07-29 17:04:47 +0700
committerhathach <[email protected]>2020-07-29 17:04:47 +0700
commit10a8ef7614b1f154576c6b3cdd14f15d1b18a443 (patch)
treeddc10f35c618b462db6785d8b7b3317081088e8e /src
parent5af08e2ffc47c6a0c90f678edd04ca57480a1747 (diff)
fix nested extern declaration of 'SystemCoreClock' [-Werror=nested-externs]
Diffstat (limited to 'src')
-rw-r--r--src/portable/st/synopsys/dcd_synopsys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/portable/st/synopsys/dcd_synopsys.c b/src/portable/st/synopsys/dcd_synopsys.c
index 7eb63e52f..03c33c598 100644
--- a/src/portable/st/synopsys/dcd_synopsys.c
+++ b/src/portable/st/synopsys/dcd_synopsys.c
@@ -231,6 +231,7 @@ static void bus_reset(uint8_t rhport)
}
// Set turn-around timeout according to link speed
+extern uint32_t SystemCoreClock;
static void set_turnaround(USB_OTG_GlobalTypeDef * usb_otg, tusb_speed_t speed)
{
usb_otg->GUSBCFG &= ~USB_OTG_GUSBCFG_TRDT;
@@ -243,7 +244,6 @@ static void set_turnaround(USB_OTG_GlobalTypeDef * usb_otg, tusb_speed_t speed)
else
{
// Turnaround timeout depends on the MCU clock
- extern uint32_t SystemCoreClock;
uint32_t turnaround;
if ( SystemCoreClock >= 32000000U )