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

Fix boot failure on Flip32+ Deluxe Acro.

The problem was the MPU6050 EXTI handler was not registered due to baro
detection taking the only callback handler slot.  When the MPU6050 EXTI
was configured the interrupt flag was never cleared which results in the
CPU being starved.
This commit is contained in:
Dominic Clifton 2015-04-16 20:26:20 +01:00
parent 7f42149c30
commit 6d5b44df7a
5 changed files with 23 additions and 2 deletions

View file

@ -44,7 +44,19 @@ void registerExti15_10_CallbackHandler(extiCallbackHandler *fn)
extiCallbackHandler *candidate = exti15_10_handlers[index];
if (!candidate) {
exti15_10_handlers[index] = fn;
break;
return;
}
}
failureMode(15); // EXTI15_10_CALLBACK_HANDLER_COUNT is too low for the amount of handlers required.
}
void unregisterExti15_10_CallbackHandler(extiCallbackHandler *fn)
{
for (int index = 0; index < EXTI15_10_CALLBACK_HANDLER_COUNT; index++) {
extiCallbackHandler *candidate = exti15_10_handlers[index];
if (candidate == fn) {
exti15_10_handlers[index] = 0;
return;
}
}
}