From b5065070345553eb05620f32182fd60348b13945 Mon Sep 17 00:00:00 2001 From: cfif Date: Fri, 31 Oct 2025 15:02:18 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DeviceStorage.c | 9 +++++++-- DeviceStorage.h | 4 +++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/DeviceStorage.c b/DeviceStorage.c index bc2d6a5..9caeaff 100644 --- a/DeviceStorage.c +++ b/DeviceStorage.c @@ -82,7 +82,8 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal sizeCalib, sizeParam, &env->publicVariablesTable, - VARIABLE_GROUP_FLASH + VARIABLE_GROUP_FLASH, + env->logger ); @@ -94,7 +95,11 @@ SECT_SRAM_NVM uint8_t dataReservedParamStore[2 * FLASH_PAGE_SIZE]; extern uint32_t __caldata_start[]; bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface, - tStorageInterface *storageParamInterface) { + tStorageInterface *storageParamInterface, + tLoggerInterface *logger) { + + env->logger = logger; + env->dataParam = (tDeviceDataNonVolatile *) dataReservedParamStore; env->dataCalib = (void *) __caldata_start; diff --git a/DeviceStorage.h b/DeviceStorage.h index 9087e54..05be16d 100644 --- a/DeviceStorage.h +++ b/DeviceStorage.h @@ -31,7 +31,9 @@ typedef struct { } tDeviceStorage; -bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface, tStorageInterface *storageParamInterface); +bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface, + tStorageInterface *storageParamInterface, + tLoggerInterface *logger); void DeviceStorage_ForceDump(tDeviceStorage *env); void DeviceStorage_DelayedDump(tDeviceStorage *env);