From 70561872350610cb2eb23996035034dc08ecedcd Mon Sep 17 00:00:00 2001 From: cfif Date: Fri, 24 Jan 2025 13:22:32 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D0=BD=D0=BE=D1=81=20?= =?UTF-8?q?=D0=BD=D0=B0=20=D0=BD=D0=BE=D0=B2=D1=83=D1=8E=20=D0=BE=D1=80?= =?UTF-8?q?=D0=B3=D0=B0=D0=BD=D0=B8=D0=B7=D0=B0=D1=86=D0=B8=D1=8E=20GONEC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 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..688924f --- /dev/null +++ b/modular.json @@ -0,0 +1,24 @@ +{ + "dep": [ + { + "type": "git", + "provider": "GONEC", + "repo": "StorageInterface" + }, + + { + "type": "git", + "provider": "GONEC", + "repo": "InternalFlashPage_ARTERY_AT32" + } + + ], + "cmake": { + "inc_dirs": [ + "Inc" + ], + "srcs": [ + "Src/**.c" + ] + } +} \ No newline at end of file