Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorあく <alleteam@gmail.com>2021-12-15 01:39:59 +0300
committerGitHub <noreply@github.com>2021-12-15 01:39:59 +0300
commit6579368053a0572d1fff38ca3a91ab209df1a1d2 (patch)
treefe32d41301876edee2ef3af6002b2d005b42dbc2 /applications/storage
parent965067b5bd7fb3fbb77d0459cc9ea10492168ad7 (diff)
[FL-1818] System setting and debug options. RTC HAL refactoring. (#902)
* FuriHal: RTC API refactoring. System Setting application. FuriCore: adjustable log levels. Minor code cleanup. * Storage: change logging levels for internal storage. * FuriCore: fix broken trace logging level
Diffstat (limited to 'applications/storage')
-rw-r--r--applications/storage/storage-cli.c2
-rw-r--r--applications/storage/storages/storage-int.c11
2 files changed, 6 insertions, 7 deletions
diff --git a/applications/storage/storage-cli.c b/applications/storage/storage-cli.c
index fc80864b..c66a965d 100644
--- a/applications/storage/storage-cli.c
+++ b/applications/storage/storage-cli.c
@@ -526,7 +526,7 @@ static void storage_cli_factory_reset(Cli* cli, string_t args, void* context) {
char c = cli_getc(cli);
if(c == 'y' || c == 'Y') {
printf("Data will be wiped after reboot.\r\n");
- furi_hal_bootloader_set_flags(FuriHalBootloaderFlagFactoryReset);
+ furi_hal_rtc_set_flag(FuriHalRtcFlagFactoryReset);
power_reboot(PowerBootModeNormal);
} else {
printf("Safe choice.\r\n");
diff --git a/applications/storage/storages/storage-int.c b/applications/storage/storages/storage-int.c
index 69ffe15e..097934b6 100644
--- a/applications/storage/storages/storage-int.c
+++ b/applications/storage/storages/storage-int.c
@@ -69,7 +69,7 @@ static int storage_int_device_read(
LFSData* lfs_data = c->context;
size_t address = lfs_data->start_address + block * c->block_size + off;
- FURI_LOG_D(
+ FURI_LOG_T(
TAG,
"Device read: block %d, off %d, buffer: %p, size %d, translated address: %p",
block,
@@ -92,7 +92,7 @@ static int storage_int_device_prog(
LFSData* lfs_data = c->context;
size_t address = lfs_data->start_address + block * c->block_size + off;
- FURI_LOG_D(
+ FURI_LOG_T(
TAG,
"Device prog: block %d, off %d, buffer: %p, size %d, translated address: %p",
block,
@@ -163,15 +163,14 @@ static LFSData* storage_int_lfs_data_alloc() {
static void storage_int_lfs_mount(LFSData* lfs_data, StorageData* storage) {
int err;
- FuriHalBootloaderFlag bootloader_flags = furi_hal_bootloader_get_flags();
lfs_t* lfs = &lfs_data->lfs;
- if(bootloader_flags & FuriHalBootloaderFlagFactoryReset) {
+ if(furi_hal_rtc_is_flag_set(FuriHalRtcFlagFactoryReset)) {
// Factory reset
err = lfs_format(lfs, &lfs_data->config);
if(err == 0) {
FURI_LOG_I(TAG, "Factory reset: Format successful, trying to mount");
- furi_hal_bootloader_set_flags(bootloader_flags & ~FuriHalBootloaderFlagFactoryReset);
+ furi_hal_rtc_reset_flag(FuriHalRtcFlagFactoryReset);
err = lfs_mount(lfs, &lfs_data->config);
if(err == 0) {
FURI_LOG_I(TAG, "Factory reset: Mounted");
@@ -687,4 +686,4 @@ void storage_int_init(StorageData* storage) {
storage->fs_api.common.rename = storage_int_common_rename;
storage->fs_api.common.remove = storage_int_common_remove;
storage->fs_api.common.fs_info = storage_int_common_fs_info;
-} \ No newline at end of file
+}