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:
parent
7f42149c30
commit
6d5b44df7a
5 changed files with 23 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue