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

Made gyro device code reentrant

This commit is contained in:
Martin Budden 2016-12-18 00:16:23 +00:00
parent a562b8fa12
commit 42344a8fe6
14 changed files with 131 additions and 131 deletions

View file

@ -33,8 +33,9 @@ void SystemClock_Config(void);
void systemReset(void)
{
if (mpuConfiguration.reset)
mpuConfiguration.reset();
if (mpuReset) {
mpuReset();
}
__disable_irq();
NVIC_SystemReset();
@ -42,9 +43,9 @@ void systemReset(void)
void systemResetToBootloader(void)
{
if (mpuConfiguration.reset)
mpuConfiguration.reset();
if (mpuReset) {
mpuReset();
}
(*(__IO uint32_t *) (BKPSRAM_BASE + 4)) = 0xDEADBEEF; // flag that will be readable after reboot