Revert "Revert Deep Sleep due to BLE issues and other random freezes"

This reverts commit addf909287.
This commit is contained in:
MX
2023-04-14 14:45:23 +03:00
parent d1df16a2bf
commit a304e9c3fa
26 changed files with 244 additions and 118 deletions
+3
View File
@@ -5,6 +5,7 @@
#include <furi_hal_console.h>
#include <furi_hal_power.h>
#include <furi_hal_rtc.h>
#include <furi_hal_debug.h>
#include <stdio.h>
#include <FreeRTOS.h>
@@ -117,6 +118,8 @@ FURI_NORETURN void __furi_crash() {
if(debug) {
furi_hal_console_puts("\r\nSystem halted. Connect debugger for more info\r\n");
furi_hal_console_puts("\033[0m\r\n");
furi_hal_debug_enable();
RESTORE_REGISTERS_AND_HALT_MCU(true);
} else {
furi_hal_rtc_set_fault_data((uint32_t)__furi_check_message);
+4
View File
@@ -24,6 +24,10 @@ extern "C" {
})
#endif
#ifndef ABS
#define ABS(a) ({ (a) < 0 ? -(a) : (a); })
#endif
#ifndef ROUND_UP_TO
#define ROUND_UP_TO(a, b) \
({ \