mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-14 19:58:36 -07:00
Fix check for normal boot (fix bootloop on flash)
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
|
||||
bool normal_boot = false;
|
||||
|
||||
void furi_hal_set_is_normal_boot(bool value) {
|
||||
normal_boot = value;
|
||||
}
|
||||
|
||||
bool furi_hal_is_normal_boot() {
|
||||
return normal_boot;
|
||||
}
|
||||
@@ -32,7 +36,6 @@ void furi_hal_deinit_early() {
|
||||
}
|
||||
|
||||
void furi_hal_init() {
|
||||
normal_boot = true;
|
||||
furi_hal_mpu_init();
|
||||
furi_hal_clock_init();
|
||||
furi_hal_console_init();
|
||||
|
||||
@@ -1415,6 +1415,7 @@ Function,+,furi_hal_rtc_set_pin_fails,void,uint32_t
|
||||
Function,+,furi_hal_rtc_set_register,void,"FuriHalRtcRegister, uint32_t"
|
||||
Function,+,furi_hal_rtc_sync_shadow,void,
|
||||
Function,+,furi_hal_rtc_validate_datetime,_Bool,FuriHalRtcDateTime*
|
||||
Function,-,furi_hal_set_is_normal_boot,void,_Bool
|
||||
Function,+,furi_hal_speaker_acquire,_Bool,uint32_t
|
||||
Function,-,furi_hal_speaker_deinit,void,
|
||||
Function,-,furi_hal_speaker_init,void,
|
||||
|
||||
|
@@ -8,6 +8,10 @@
|
||||
|
||||
bool normal_boot = false;
|
||||
|
||||
void furi_hal_set_is_normal_boot(bool value) {
|
||||
normal_boot = value;
|
||||
}
|
||||
|
||||
bool furi_hal_is_normal_boot() {
|
||||
return normal_boot;
|
||||
}
|
||||
@@ -32,7 +36,6 @@ void furi_hal_deinit_early() {
|
||||
}
|
||||
|
||||
void furi_hal_init() {
|
||||
normal_boot = true;
|
||||
furi_hal_mpu_init();
|
||||
furi_hal_clock_init();
|
||||
furi_hal_console_init();
|
||||
|
||||
@@ -26,6 +26,7 @@ int main() {
|
||||
// Flipper critical FURI HAL
|
||||
furi_hal_init_early();
|
||||
|
||||
furi_hal_set_is_normal_boot(false);
|
||||
FuriThread* main_thread = furi_thread_alloc_ex("Init", 4096, init_task, NULL);
|
||||
|
||||
#ifdef FURI_RAM_EXEC
|
||||
@@ -58,6 +59,7 @@ int main() {
|
||||
furi_hal_power_reset();
|
||||
} else {
|
||||
furi_hal_light_sequence("rgb G");
|
||||
furi_hal_set_is_normal_boot(true);
|
||||
furi_thread_start(main_thread);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -42,7 +42,10 @@ struct STOP_EXTERNING_ME {};
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/** True if normally with all subsystems */
|
||||
/** Set whether booting normally with all subsystems */
|
||||
void furi_hal_set_is_normal_boot(bool value);
|
||||
|
||||
/** True if booting normally with all subsystems */
|
||||
bool furi_hal_is_normal_boot();
|
||||
|
||||
/** Early FuriHal init, only essential subsystems */
|
||||
|
||||
Reference in New Issue
Block a user