diff --git a/MainModesArbiter.h b/MainModesArbiter.h index f851379..934c046 100644 --- a/MainModesArbiter.h +++ b/MainModesArbiter.h @@ -17,7 +17,8 @@ #include "ComInt.h" #include "Indication.h" #include "CommandLines.h" -#include "" +#include "DeviceStorage.h" + typedef struct { // Преферийные интерфесы @@ -26,6 +27,7 @@ typedef struct { tCanPorts *canPorts; tLoggerToSerialPort slog; tComInt comInt; + tStorageOnFlash *flash; tRtcs *rtcs; tAdcs *adcs; diff --git a/MainModesArbiter_InitStage.c b/MainModesArbiter_InitStage.c index befcb46..741c4b1 100644 --- a/MainModesArbiter_InitStage.c +++ b/MainModesArbiter_InitStage.c @@ -11,7 +11,7 @@ const char LOG_TASK_MAIN[] = "Initialization task"; void Mma_InitComIntLog(tMma *env) { - Indication_Init(&env->Indication, HVAC_DEV_MODE_STARTUP); + LoggerToSerialPort_Init( &env->slog, 0, @@ -35,6 +35,11 @@ static void Mma_InitSubSystems(tMma *env) { Mma_InitComIntLog(env); LoggerInfoStatic(&env->slog.logger, LOG_TASK_MAIN, "Инициализация подсистем") + + bool result = DeviceStorage_Init(&env->storage, &env->flash->interface); + + Indication_Init(&env->Indication, HVAC_DEV_MODE_STARTUP); + /* ComInt_Init( &env->comInt, diff --git a/PeripheralInterfaces.c b/PeripheralInterfaces.c index 2aa18dd..62a48ea 100644 --- a/PeripheralInterfaces.c +++ b/PeripheralInterfaces.c @@ -11,5 +11,6 @@ void InitPeripheralInterfaces() { SerialPorts_Init(); CanPorts_Init(); Rtcs_Init(); + StorageOnFlash_Init(); Pwms_Init(); } \ No newline at end of file diff --git a/PeripheralInterfaces.h b/PeripheralInterfaces.h index 3bedb88..e3cb185 100644 --- a/PeripheralInterfaces.h +++ b/PeripheralInterfaces.h @@ -11,6 +11,7 @@ #include "Rtcs.h" #include "Adcs.h" #include "Pwms.h" +#include "StorageOnFlash.h" void InitPeripheralInterfaces();