From daa1a48cce7fbb2d1aa1fafcb1a3a142b03051e9 Mon Sep 17 00:00:00 2001 From: cfif Date: Wed, 4 Dec 2024 13:10:47 +0300 Subject: [PATCH] Init --- StorageOnFlash.c | 13 +++++++++++++ StorageOnFlash.h | 19 +++++++++++++++++++ modular.json | 17 +++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 StorageOnFlash.c create mode 100644 StorageOnFlash.h create mode 100644 modular.json diff --git a/StorageOnFlash.c b/StorageOnFlash.c new file mode 100644 index 0000000..c3f40f7 --- /dev/null +++ b/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; + vStorageOnFlashNation_Init(&env->nf_storage, 0x8078000, 0x807C000); + env->interface = xStorageOnFlashNation_GetInterface(&env->nf_storage); +} \ No newline at end of file diff --git a/StorageOnFlash.h b/StorageOnFlash.h new file mode 100644 index 0000000..4fc26f8 --- /dev/null +++ b/StorageOnFlash.h @@ -0,0 +1,19 @@ +// +// Created by xemon on 19.12.22. +// + +#ifndef UVEOS_ON_NATION_STORAGEONFLASH_H +#define UVEOS_ON_NATION_STORAGEONFLASH_H + +#include "StorageOnFlashNation.h" + +typedef struct { + tStorageOnFlashNation nf_storage; + tStorageInterface interface; +} tStorageOnFlash; + +extern tStorageOnFlash NVM_STORAGE; + +void StorageOnFlash_Init(); + +#endif //UVEOS_ON_NATION_STORAGEONFLASH_H diff --git a/modular.json b/modular.json new file mode 100644 index 0000000..9ebcef6 --- /dev/null +++ b/modular.json @@ -0,0 +1,17 @@ +{ + "dep": [ + { + "type": "git", + "provider": "NAVIGATOR_UVEOS_NATION_TELIT", + "repo": "StorageOnFlash_NATION_N32G45X" + } + ], + "cmake": { + "inc_dirs": [ + "./" + ], + "srcs": [ + "./**.c" + ] + } +} \ No newline at end of file