diff --git a/StorageOnFlash.c b/StorageOnFlash.c index eba0e54..1ee0cc1 100644 --- a/StorageOnFlash.c +++ b/StorageOnFlash.c @@ -3,15 +3,22 @@ // #include "StorageOnFlash.h" +#define LOG_SIGN "INIT" +#define LOGGER logger + tStorageOnFlash NVM_STORAGE; -void StorageOnFlash_Init() { +void StorageOnFlash_Init(tLoggerInterface *logger) { 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); + 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); 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) + } \ No newline at end of file diff --git a/StorageOnFlash.h b/StorageOnFlash.h index 352198b..ca993de 100644 --- a/StorageOnFlash.h +++ b/StorageOnFlash.h @@ -26,6 +26,6 @@ typedef struct { extern tStorageOnFlash NVM_STORAGE; -void StorageOnFlash_Init(); +void StorageOnFlash_Init(tLoggerInterface *logger); #endif //HVAC_STORAGEONFLASH_H