mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 00:05:33 +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:
commit
131e32c142
1 changed files with 5 additions and 6 deletions
|
@ -301,12 +301,6 @@ void init(void)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Configure MCO output after config is stable
|
|
||||||
|
|
||||||
#ifdef USE_MCO
|
|
||||||
mcoInit(mcoConfig());
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Note that spektrumBind checks if a call is immediately after
|
// Note that spektrumBind checks if a call is immediately after
|
||||||
// hard reset (including power cycle), so it should be called before
|
// hard reset (including power cycle), so it should be called before
|
||||||
// systemClockSetHSEValue and OverclockRebootIfNecessary, as these
|
// systemClockSetHSEValue and OverclockRebootIfNecessary, as these
|
||||||
|
@ -337,6 +331,11 @@ void init(void)
|
||||||
OverclockRebootIfNecessary(systemConfig()->cpu_overclock);
|
OverclockRebootIfNecessary(systemConfig()->cpu_overclock);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Configure MCO output after config is stable
|
||||||
|
#ifdef USE_MCO
|
||||||
|
mcoInit(mcoConfig());
|
||||||
|
#endif
|
||||||
|
|
||||||
timerInit(); // timer must be initialized before any channel is allocated
|
timerInit(); // timer must be initialized before any channel is allocated
|
||||||
|
|
||||||
#ifdef BUS_SWITCH_PIN
|
#ifdef BUS_SWITCH_PIN
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue