From cb305cf9f10af2a29463ac19267676d57d9279d6 Mon Sep 17 00:00:00 2001 From: cfif Date: Mon, 26 May 2025 14:41:45 +0300 Subject: [PATCH] Init --- Inc/StorageOnFlash.h | 19 +++++++++++++++++++ Src/StorageOnFlash.c | 13 +++++++++++++ modular.json | 24 ++++++++++++++++++++++++ 3 files changed, 56 insertions(+) create mode 100644 Inc/StorageOnFlash.h create mode 100644 Src/StorageOnFlash.c create mode 100644 modular.json diff --git a/Inc/StorageOnFlash.h b/Inc/StorageOnFlash.h new file mode 100644 index 0000000..3743c80 --- /dev/null +++ b/Inc/StorageOnFlash.h @@ -0,0 +1,19 @@ +// +// Created by xemon on 19.12.22. +// + +#ifndef UVEOS_ON_ARTERY_STORAGEONFLASH_H +#define UVEOS_ON_ARTERY_STORAGEONFLASH_H + +#include "StorageOnFlashArtery.h" + +typedef struct { + tStorageOnFlashArtery nf_storage; + tStorageInterface interface; +} tStorageOnFlash; + +extern tStorageOnFlash NVM_STORAGE; + +void StorageOnFlash_Init(); + +#endif //UVEOS_ON_ARTERY_STORAGEONFLASH_H diff --git a/Src/StorageOnFlash.c b/Src/StorageOnFlash.c new file mode 100644 index 0000000..ef28133 --- /dev/null +++ b/Src/StorageOnFlash.c @@ -0,0 +1,13 @@ +// +// Created by xemon on 19.12.22. +// + +#include "StorageOnFlash.h" + +tStorageOnFlash NVM_STORAGE; + +void StorageOnFlash_Init() { + tStorageOnFlash *env = &NVM_STORAGE; + vStorageOnFlashArtery_Init(&env->nf_storage, 0x083C0000, 0x083D0000); + env->interface = xStorageOnFlashArtery_GetInterface(&env->nf_storage); +} \ No newline at end of file diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..43adb79 --- /dev/null +++ b/modular.json @@ -0,0 +1,24 @@ +{ + "dep": [ + { + "type": "git", + "provider": "GONEC_NEW", + "repo": "StorageInterface" + }, + + { + "type": "git", + "provider": "GONEC_NEW", + "repo": "InternalFlashPage_ARTERY_AT32" + } + + ], + "cmake": { + "inc_dirs": [ + "Inc" + ], + "srcs": [ + "Src/**.c" + ] + } +} \ No newline at end of file