[FL-2219, FL-2251] System, FuriCore, FuriHal: various bug fixes and improvements (#986)
* Replace irq shenanigans with critical section * Power: halt system on power off instead of crash. * Gui: properly handle input event on NULL current_view * FuriHal: correct gpio configuration sequence * FuriHal: cleanup uart initialization. Makefile: allow to disable thread support. * Loader: improve locking, fix simultaneous app start crash, full command line args support for gui apps, more consistent insomnia * Loader: correct spelling * FuriHal: increase gpio configuration readability * FuriHal: correct gpio configuration error when mode is GpioModeEventRiseFall Co-authored-by: DrZlo13 <who.just.the.doctor@gmail.com>
This commit is contained in:
@@ -31,9 +31,9 @@ int WIEGAND::getWiegandType() {
|
||||
|
||||
bool WIEGAND::available() {
|
||||
bool ret;
|
||||
__disable_irq();
|
||||
FURI_CRITICAL_ENTER();
|
||||
ret = DoWiegandConversion();
|
||||
__enable_irq();
|
||||
FURI_CRITICAL_EXIT();
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -221,4 +221,4 @@ bool WIEGAND::DoWiegandConversion() {
|
||||
}
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
@@ -37,7 +37,7 @@ bool AccessorSceneStart::on_event(AccessorApp* app, AccessorEvent* event) {
|
||||
data[i] = wiegand->getCodeHigh() >> ((i - 4) * 8);
|
||||
}
|
||||
} else {
|
||||
__disable_irq();
|
||||
FURI_CRITICAL_ENTER();
|
||||
if(onewire->reset()) {
|
||||
type = 255;
|
||||
onewire->write(0x33);
|
||||
@@ -49,7 +49,7 @@ bool AccessorSceneStart::on_event(AccessorApp* app, AccessorEvent* event) {
|
||||
data[i] = data[i + 1];
|
||||
}
|
||||
}
|
||||
__enable_irq();
|
||||
FURI_CRITICAL_EXIT();
|
||||
}
|
||||
|
||||
if(type > 0) {
|
||||
@@ -85,4 +85,4 @@ void AccessorSceneStart::on_exit(AccessorApp* app) {
|
||||
Popup* popup = app->get_view_manager()->get_popup();
|
||||
popup_set_header(popup, NULL, 0, 0, AlignCenter, AlignBottom);
|
||||
popup_set_text(popup, NULL, 0, 0, AlignCenter, AlignTop);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user