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-08-08 21:03:25 +0300
committerGitHub <noreply@github.com>2021-08-08 21:03:25 +0300
commit0a97d6913c1a48156e3e2d8f339e027a003f948f (patch)
treed02cd7895df05654c4e106a28055333fd976228a /applications/storage
parent7907cb232bda5af7c30c79c67ab353b2cefe57c8 (diff)
Rename api-hal to furi-hal (#629)
Diffstat (limited to 'applications/storage')
-rw-r--r--applications/storage/storage-cli.c4
-rw-r--r--applications/storage/storage-glue.c6
-rw-r--r--applications/storage/storage-test-app.c2
-rw-r--r--applications/storage/storages/storage-ext.c4
-rw-r--r--applications/storage/storages/storage-int.c26
5 files changed, 21 insertions, 21 deletions
diff --git a/applications/storage/storage-cli.c b/applications/storage/storage-cli.c
index 684e9a8b..ed76b2d1 100644
--- a/applications/storage/storage-cli.c
+++ b/applications/storage/storage-cli.c
@@ -3,7 +3,7 @@
#include <lib/toolbox/args.h>
#include <storage/storage.h>
#include <storage/storage-sd-api.h>
-#include <api-hal-version.h>
+#include <furi-hal-version.h>
#define MAX_NAME_LENGTH 255
@@ -64,7 +64,7 @@ void storage_cli_info(Cli* cli, string_t path) {
} else {
printf(
"Label: %s\r\nType: LittleFS\r\n%lu KB total\r\n%lu KB free\r\n",
- api_hal_version_get_name_ptr(),
+ furi_hal_version_get_name_ptr(),
(uint32_t)(total_space / 1024),
(uint32_t)(free_space / 1024));
}
diff --git a/applications/storage/storage-glue.c b/applications/storage/storage-glue.c
index 9477712d..8f115f53 100644
--- a/applications/storage/storage-glue.c
+++ b/applications/storage/storage-glue.c
@@ -1,5 +1,5 @@
#include "storage-glue.h"
-#include <api-hal.h>
+#include <furi-hal.h>
/****************** storage file ******************/
@@ -39,12 +39,12 @@ void storage_data_init(StorageData* storage) {
}
bool storage_data_lock(StorageData* storage) {
- api_hal_power_insomnia_enter();
+ furi_hal_power_insomnia_enter();
return (osMutexAcquire(storage->mutex, osWaitForever) == osOK);
}
bool storage_data_unlock(StorageData* storage) {
- api_hal_power_insomnia_exit();
+ furi_hal_power_insomnia_exit();
return (osMutexRelease(storage->mutex) == osOK);
}
diff --git a/applications/storage/storage-test-app.c b/applications/storage/storage-test-app.c
index 7e3f0a58..022181a5 100644
--- a/applications/storage/storage-test-app.c
+++ b/applications/storage/storage-test-app.c
@@ -1,5 +1,5 @@
#include <furi.h>
-#include <api-hal.h>
+#include <furi-hal.h>
#include <storage/storage.h>
#define TAG "storage-test"
diff --git a/applications/storage/storages/storage-ext.c b/applications/storage/storages/storage-ext.c
index 6d0f7b68..b29fdf7a 100644
--- a/applications/storage/storages/storage-ext.c
+++ b/applications/storage/storages/storage-ext.c
@@ -1,9 +1,9 @@
#include "fatfs.h"
#include "../filesystem-api-internal.h"
#include "storage-ext.h"
-#include <api-hal.h>
+#include <furi-hal.h>
#include "sd-notify.h"
-#include <api-hal-sd.h>
+#include <furi-hal-sd.h>
typedef FIL SDFile;
typedef DIR SDDir;
diff --git a/applications/storage/storages/storage-int.c b/applications/storage/storages/storage-int.c
index 625ded6d..473ac4f5 100644
--- a/applications/storage/storages/storage-int.c
+++ b/applications/storage/storages/storage-int.c
@@ -1,6 +1,6 @@
#include "storage-int.h"
#include <lfs.h>
-#include <api-hal.h>
+#include <furi-hal.h>
#define TAG "storage-int"
#define STORAGE_PATH "/int"
@@ -103,7 +103,7 @@ static int storage_int_device_prog(
int ret = 0;
while(size > 0) {
- if(!api_hal_flash_write_dword(address, *(uint64_t*)buffer)) {
+ if(!furi_hal_flash_write_dword(address, *(uint64_t*)buffer)) {
ret = -1;
break;
}
@@ -121,7 +121,7 @@ static int storage_int_device_erase(const struct lfs_config* c, lfs_block_t bloc
FURI_LOG_D(TAG, "Device erase: page %d, translated page: %d", block, page);
- if(api_hal_flash_erase(page, 1)) {
+ if(furi_hal_flash_erase(page, 1)) {
return 0;
} else {
return -1;
@@ -137,9 +137,9 @@ static LFSData* storage_int_lfs_data_alloc() {
LFSData* lfs_data = furi_alloc(sizeof(LFSData));
// Internal storage start address
- *(size_t*)(&lfs_data->start_address) = api_hal_flash_get_free_page_start_address();
+ *(size_t*)(&lfs_data->start_address) = furi_hal_flash_get_free_page_start_address();
*(size_t*)(&lfs_data->start_page) =
- (lfs_data->start_address - api_hal_flash_get_base()) / api_hal_flash_get_page_size();
+ (lfs_data->start_address - furi_hal_flash_get_base()) / furi_hal_flash_get_page_size();
// LFS configuration
// Glue and context
@@ -150,11 +150,11 @@ static LFSData* storage_int_lfs_data_alloc() {
lfs_data->config.sync = storage_int_device_sync;
// Block device description
- lfs_data->config.read_size = api_hal_flash_get_read_block_size();
- lfs_data->config.prog_size = api_hal_flash_get_write_block_size();
- lfs_data->config.block_size = api_hal_flash_get_page_size();
- lfs_data->config.block_count = api_hal_flash_get_free_page_count();
- lfs_data->config.block_cycles = api_hal_flash_get_cycles_count();
+ lfs_data->config.read_size = furi_hal_flash_get_read_block_size();
+ lfs_data->config.prog_size = furi_hal_flash_get_write_block_size();
+ lfs_data->config.block_size = furi_hal_flash_get_page_size();
+ lfs_data->config.block_count = furi_hal_flash_get_free_page_count();
+ lfs_data->config.block_cycles = furi_hal_flash_get_cycles_count();
lfs_data->config.cache_size = 16;
lfs_data->config.lookahead_size = 16;
@@ -163,15 +163,15 @@ static LFSData* storage_int_lfs_data_alloc() {
static void storage_int_lfs_mount(LFSData* lfs_data, StorageData* storage) {
int err;
- ApiHalBootFlag boot_flags = api_hal_boot_get_flags();
+ FuriHalBootFlag boot_flags = furi_hal_boot_get_flags();
lfs_t* lfs = &lfs_data->lfs;
- if(boot_flags & ApiHalBootFlagFactoryReset) {
+ if(boot_flags & FuriHalBootFlagFactoryReset) {
// Factory reset
err = lfs_format(lfs, &lfs_data->config);
if(err == 0) {
FURI_LOG_I(TAG, "Factory reset: Format successful, trying to mount");
- api_hal_boot_set_flags(boot_flags & ~ApiHalBootFlagFactoryReset);
+ furi_hal_boot_set_flags(boot_flags & ~FuriHalBootFlagFactoryReset);
err = lfs_mount(lfs, &lfs_data->config);
if(err == 0) {
FURI_LOG_I(TAG, "Factory reset: Mounted");