From feb57576c9a21d3497ae30318de647ba4f68240b Mon Sep 17 00:00:00 2001 From: cfif Date: Mon, 17 Nov 2025 16:28:51 +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 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/DeviceStorage.c b/DeviceStorage.c index 9caeaff..0b817a3 100644 --- a/DeviceStorage.c +++ b/DeviceStorage.c @@ -9,6 +9,7 @@ #include "StorageOnFlashFlagchip.h" #include "SystemDelayInterface.h" #include "HVAC_preDefine.h" +#include "StorageOnFlash.h" #define LOGGER env->logger #define LOG_SIGN "Хран." @@ -91,7 +92,7 @@ void DeviceStorage_InitCommon(tDeviceStorage *env, tStorageInterface *storageCal } -SECT_SRAM_NVM uint8_t dataReservedParamStore[2 * FLASH_PAGE_SIZE]; +SECT_SRAM_NVM uint8_t dataReservedParamStore[nf_storage_param_size]; extern uint32_t __caldata_start[]; bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInterface, @@ -103,8 +104,8 @@ bool DeviceStorage_Init(tDeviceStorage *env, tStorageInterface *storageCalibInte env->dataParam = (tDeviceDataNonVolatile *) dataReservedParamStore; env->dataCalib = (void *) __caldata_start; - DeviceStorage_InitCommon(env, storageParamInterface, sizeof(dataReservedParamStore), - storageCalibInterface, 7 * FLASH_PAGE_SIZE); + DeviceStorage_InitCommon(env, storageParamInterface, nf_storage_param_size, + storageCalibInterface, nf_storage_calib_size); bool resultParam = DeviceStorage_LoadParam(env); bool resultCalib = DeviceStorage_LoadCalib(env);