commit 232afb459e3f0eab2ab0917df2204a6d7bba5980 Author: cfif Date: Mon Jun 2 13:26:39 2025 +0300 Init diff --git a/StorageOnFlash.c b/StorageOnFlash.c new file mode 100644 index 0000000..b788172 --- /dev/null +++ b/StorageOnFlash.c @@ -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); +} \ No newline at end of file diff --git a/StorageOnFlash.h b/StorageOnFlash.h new file mode 100644 index 0000000..288b57e --- /dev/null +++ b/StorageOnFlash.h @@ -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 diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..2e36a23 --- /dev/null +++ b/modular.json @@ -0,0 +1,17 @@ +{ + "dep": [ + { + "type": "git", + "provider": "Smart_Components_Aurus", + "repo": "StorageOnFlash_ARTERY_AT32" + } + ], + "cmake": { + "inc_dirs": [ + "./" + ], + "srcs": [ + "./**.c" + ] + } +} \ No newline at end of file