Storage: lfs config fingerprinting. RTC: fix data collision in lock register, refactor and cleanup. (#928)
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include <furi-hal-bootloader.h>
|
||||
#include <stm32wbxx_ll_rtc.h>
|
||||
#include <furi-hal-rtc.h>
|
||||
#include <furi.h>
|
||||
|
||||
#define TAG "FuriHalBoot"
|
||||
@@ -11,15 +11,15 @@
|
||||
|
||||
void furi_hal_bootloader_init() {
|
||||
#ifndef DEBUG
|
||||
LL_RTC_BAK_SetRegister(RTC, LL_RTC_BKP_DR0, BOOT_REQUEST_TAINTED);
|
||||
furi_hal_rtc_set_register(FuriHalRtcRegisterBoot, BOOT_REQUEST_TAINTED);
|
||||
#endif
|
||||
FURI_LOG_I(TAG, "Init OK");
|
||||
}
|
||||
|
||||
void furi_hal_bootloader_set_mode(FuriHalBootloaderMode mode) {
|
||||
if (mode == FuriHalBootloaderModeNormal) {
|
||||
LL_RTC_BAK_SetRegister(RTC, LL_RTC_BKP_DR0, BOOT_REQUEST_CLEAN);
|
||||
furi_hal_rtc_set_register(FuriHalRtcRegisterBoot, BOOT_REQUEST_CLEAN);
|
||||
} else if (mode == FuriHalBootloaderModeDFU) {
|
||||
LL_RTC_BAK_SetRegister(RTC, LL_RTC_BKP_DR0, BOOT_REQUEST_DFU);
|
||||
furi_hal_rtc_set_register(FuriHalRtcRegisterBoot, BOOT_REQUEST_DFU);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user