This commit is contained in:
cfif 2025-06-02 15:22:57 +03:00
commit e5d01a8d50
3 changed files with 52 additions and 0 deletions

16
StorageOnFlash.c Normal file
View File

@ -0,0 +1,16 @@
//
// Created by ilya on 05.04.24.
//
#include "StorageOnFlash.h"
#include "ld_adr.h"
tStorageOnFlash NVM_STORAGE;
void StorageOnFlash_Init() {
tStorageOnFlash *env = &NVM_STORAGE;
vStorageOnFlashArtery_Init(&env->nf_storage, 0x08000000 + BOOT_AREA_LENGTH + FIRMWARE_MAIN_AREA_LENGTH +
FIRMWARE_MAIN_UPDATE_AREA_LENGTH + FIRMWARE_TELE_AREA_LENGTH,
0x08000000 + BOOT_AREA_LENGTH + FIRMWARE_MAIN_AREA_LENGTH +
FIRMWARE_MAIN_UPDATE_AREA_LENGTH + FIRMWARE_TELE_AREA_LENGTH + FIRMWARE_SETTINGS_AREA_LENGTH);
env->interface = xStorageOnFlashArtery_GetInterface(&env->nf_storage);
}

19
StorageOnFlash.h Normal file
View File

@ -0,0 +1,19 @@
//
// Created by ilya on 05.04.24.
//
#ifndef SMART_COMPONENTS_STORAGEONFLASH_H
#define SMART_COMPONENTS_STORAGEONFLASH_H
#include "StorageOnFlashArtery.h"
typedef struct {
tStorageOnFlashArtery nf_storage;
tStorageInterface interface;
} tStorageOnFlash;
extern tStorageOnFlash NVM_STORAGE;
void StorageOnFlash_Init();
#endif //SMART_COMPONENTS_STORAGEONFLASH_H

17
modular.json Normal file
View File

@ -0,0 +1,17 @@
{
"dep": [
{
"type": "git",
"provider": "Smart_Components_Aurus",
"repo": "StorageOnFlash_ARTERY_AT32"
}
],
"cmake": {
"inc_dirs": [
"./"
],
"srcs": [
"./**.c"
]
}
}