Обновление

This commit is contained in:
cfif 2025-10-24 12:29:49 +03:00
commit c8cd7afebe
3 changed files with 56 additions and 0 deletions

17
StorageOnFlash.c Normal file
View File

@ -0,0 +1,17 @@
//
// Created by CFIF on 05.04.24.
//
#include "StorageOnFlash.h"
tStorageOnFlash NVM_STORAGE;
void StorageOnFlash_Init() {
tStorageOnFlash *env = &NVM_STORAGE;
vStorageOnFlashFlagchip_Init(&env->nf_storage_calib, nf_storage_calib_mainFlashPageAddress,nf_storage_calib_recoveryFlashPageAddress);
env->interface_calib = xStorageOnFlashFlagchip_GetInterface(&env->nf_storage_calib);
vStorageOnFlashFlagchip_Init(&env->nf_storage_param, nf_storage_param_mainFlashPageAddress,nf_storage_param_recoveryFlashPageAddress);
env->interface_param = xStorageOnFlashFlagchip_GetInterface(&env->nf_storage_param);
}

29
StorageOnFlash.h Normal file
View File

@ -0,0 +1,29 @@
//
// Created by CFIF on 05.04.24.
//
#ifndef HVAC_STORAGEONFLASH_H
#define HVAC_STORAGEONFLASH_H
#include "StorageOnFlashFlagchip.h"
#define nf_storage_calib_mainFlashPageAddress 0x04000000
#define nf_storage_calib_recoveryFlashPageAddress 0x04000000
#define nf_storage_param_mainFlashPageAddress 0x04000000
#define nf_storage_param_recoveryFlashPageAddress 0x04000000
typedef struct {
tStorageOnFlashFlagchip nf_storage_calib;
tStorageInterface interface_calib;
tStorageOnFlashFlagchip nf_storage_param;
tStorageInterface interface_param;
} tStorageOnFlash;
extern tStorageOnFlash NVM_STORAGE;
void StorageOnFlash_Init();
#endif //HVAC_STORAGEONFLASH_H

10
modular.json Normal file
View File

@ -0,0 +1,10 @@
{
"cmake": {
"inc_dirs": [
"./"
],
"srcs": [
"./**.c"
]
}
}