[FL-1009, FL-1118] Better initialization sequence and V8 hardware support (#406)
* Interrupt manager: add memory barriers. * ISRs: remove TIM17 dead code. * API HAL Delay: rename initialization routine and move to API-HAL * Main: move FURI initialization to the start. * API HAL GPIO: drop CC1101 shenanigans, COMP inversion for new boards. * IButton: migrate Cyfral and Metakom to RFID comp routine, make it compatible with new boards. * RFID: Better keyboard handling and shutdown routines
This commit is contained in:
@@ -36,11 +36,9 @@ void api_interrupt_add(InterruptCallback callback, InterruptType type, void* con
|
||||
item->callback = callback;
|
||||
item->type = type;
|
||||
item->context = context;
|
||||
asm volatile("dmb" : : : "memory");
|
||||
item->ready = true;
|
||||
|
||||
// TODO remove on app exit
|
||||
//flapp_on_exit(api_interrupt_remove, callback);
|
||||
|
||||
osMutexRelease(interrupt_mutex);
|
||||
}
|
||||
}
|
||||
@@ -77,6 +75,7 @@ void api_interrupt_enable(InterruptCallback callback, InterruptType type) {
|
||||
// if the iterator is equal to our element
|
||||
if(it->current->data.callback == callback) {
|
||||
it->current->data.ready = true;
|
||||
asm volatile("dmb" : : : "memory");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -96,6 +95,7 @@ void api_interrupt_disable(InterruptCallback callback, InterruptType type) {
|
||||
// if the iterator is equal to our element
|
||||
if(it->current->data.callback == callback) {
|
||||
it->current->data.ready = false;
|
||||
asm volatile("dmb" : : : "memory");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user