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);