Init
This commit is contained in:
commit
e5d01a8d50
|
|
@ -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);
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
@ -0,0 +1,17 @@
|
|||
{
|
||||
"dep": [
|
||||
{
|
||||
"type": "git",
|
||||
"provider": "Smart_Components_Aurus",
|
||||
"repo": "StorageOnFlash_ARTERY_AT32"
|
||||
}
|
||||
],
|
||||
"cmake": {
|
||||
"inc_dirs": [
|
||||
"./"
|
||||
],
|
||||
"srcs": [
|
||||
"./**.c"
|
||||
]
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue