mirror of
https://github.com/hathach/tinyusb.git
synced 2025-04-24 18:02:40 +00:00
fix nested extern declaration of 'SystemCoreClock' [-Werror=nested-externs]
This commit is contained in:
parent
5af08e2ffc
commit
10a8ef7614
@ -231,6 +231,7 @@ static void bus_reset(uint8_t rhport)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Set turn-around timeout according to link speed
|
// 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)
|
static void set_turnaround(USB_OTG_GlobalTypeDef * usb_otg, tusb_speed_t speed)
|
||||||
{
|
{
|
||||||
usb_otg->GUSBCFG &= ~USB_OTG_GUSBCFG_TRDT;
|
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
|
else
|
||||||
{
|
{
|
||||||
// Turnaround timeout depends on the MCU clock
|
// Turnaround timeout depends on the MCU clock
|
||||||
extern uint32_t SystemCoreClock;
|
|
||||||
uint32_t turnaround;
|
uint32_t turnaround;
|
||||||
|
|
||||||
if ( SystemCoreClock >= 32000000U )
|
if ( SystemCoreClock >= 32000000U )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user