1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Merge pull request #7246 from mikeller/move_mco_init

Moved 'mcoInit()' to after 'OverclockRebootIfNecessary()' to have it execute only once.
This commit is contained in:
Michael Keller 2018-12-22 12:16:26 +13:00 committed by GitHub
commit 131e32c142
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -301,12 +301,6 @@ void init(void)
}
#endif
// Configure MCO output after config is stable
#ifdef USE_MCO
mcoInit(mcoConfig());
#endif
// Note that spektrumBind checks if a call is immediately after
// hard reset (including power cycle), so it should be called before
// systemClockSetHSEValue and OverclockRebootIfNecessary, as these
@ -337,6 +331,11 @@ void init(void)
OverclockRebootIfNecessary(systemConfig()->cpu_overclock);
#endif
// Configure MCO output after config is stable
#ifdef USE_MCO
mcoInit(mcoConfig());
#endif
timerInit(); // timer must be initialized before any channel is allocated
#ifdef BUS_SWITCH_PIN