Обновление

This commit is contained in:
cfif 2026-02-05 10:59:40 +03:00
parent d9e10b1731
commit 5c711f27a8
2 changed files with 9 additions and 2 deletions

View File

@ -3,15 +3,22 @@
// //
#include "StorageOnFlash.h" #include "StorageOnFlash.h"
#define LOG_SIGN "INIT"
#define LOGGER logger
tStorageOnFlash NVM_STORAGE; tStorageOnFlash NVM_STORAGE;
void StorageOnFlash_Init() { void StorageOnFlash_Init(tLoggerInterface *logger) {
tStorageOnFlash *env = &NVM_STORAGE; tStorageOnFlash *env = &NVM_STORAGE;
vStorageOnFlashFlagchip_Init(&env->nf_storage_calib, nf_storage_calib_mainFlashPageAddress,nf_storage_calib_recoveryFlashPageAddress); vStorageOnFlashFlagchip_Init(&env->nf_storage_calib, nf_storage_calib_mainFlashPageAddress,nf_storage_calib_recoveryFlashPageAddress);
env->interface_calib = xStorageOnFlashFlagchip_GetInterface(&env->nf_storage_calib); env->interface_calib = xStorageOnFlashFlagchip_GetInterface(&env->nf_storage_calib);
LoggerFormatInfo(LOGGER, LOG_SIGN, "Initialization calibrations STORE, Main adr: 0x%08X Recovery adr: 0x%08X", env->nf_storage_calib.mainFlashPageAddress, env->nf_storage_calib.recoveryFlashPageAddress)
vStorageOnFlashFlagchip_Init(&env->nf_storage_param, nf_storage_param_mainFlashPageAddress,nf_storage_param_recoveryFlashPageAddress); vStorageOnFlashFlagchip_Init(&env->nf_storage_param, nf_storage_param_mainFlashPageAddress,nf_storage_param_recoveryFlashPageAddress);
env->interface_param = xStorageOnFlashFlagchip_GetInterface(&env->nf_storage_param); env->interface_param = xStorageOnFlashFlagchip_GetInterface(&env->nf_storage_param);
LoggerFormatInfo(LOGGER, LOG_SIGN, "Initialization parameters STORE, Main adr: 0x%08X Recovery adr: 0x%08X", env->nf_storage_param.mainFlashPageAddress, env->nf_storage_param.recoveryFlashPageAddress)
} }

View File

@ -26,6 +26,6 @@ typedef struct {
extern tStorageOnFlash NVM_STORAGE; extern tStorageOnFlash NVM_STORAGE;
void StorageOnFlash_Init(); void StorageOnFlash_Init(tLoggerInterface *logger);
#endif //HVAC_STORAGEONFLASH_H #endif //HVAC_STORAGEONFLASH_H