diff --git a/MainModesArbiter.c b/MainModesArbiter.c index 34acba1..e82e71a 100644 --- a/MainModesArbiter.c +++ b/MainModesArbiter.c @@ -8,11 +8,13 @@ void Mma_Init( tGpios *gpios, tSerialPorts *serialPorts, tCanPorts *canPorts, + tSpiPorts *spiPorts, tRtcs *rtcs ) { env->gpios = gpios; env->serialPorts = serialPorts; env->canPorts = canPorts; + env->spiPorts = spiPorts; env->rtcs = rtcs; InitThreadAtrStatic(&env->thread.attr, "Mma", env->thread.controlBlock, env->thread.stack, osPriorityNormal); diff --git a/MainModesArbiter.h b/MainModesArbiter.h index 12cce5f..64cd05d 100644 --- a/MainModesArbiter.h +++ b/MainModesArbiter.h @@ -19,11 +19,13 @@ #include "Indication.h" #include "CommandLines.h" #include "ArbiterCommand.h" +#include "SpiPorts.h" typedef struct { // Преферийные интерфесы tGpios *gpios; tSerialPorts *serialPorts; + tSpiPorts *spiPorts; tCanPorts *canPorts; tLoggerToSerialPortV2 slog; tComInt comInt; @@ -64,6 +66,7 @@ void Mma_Init( tGpios *gpios, tSerialPorts *serialPorts, tCanPorts *canPorts, + tSpiPorts *spiPorts, tRtcs *rtcs ); diff --git a/PeripheralInterfaces.c b/PeripheralInterfaces.c index aa3de1f..d17802c 100644 --- a/PeripheralInterfaces.c +++ b/PeripheralInterfaces.c @@ -9,5 +9,6 @@ void InitPeripheralInterfaces() { Gpios_Init(); SerialPorts_Init(&GPIOS.comIntDir); CanPorts_Init(); + SpiPorts_Init(&GPIOS.SpiChipSelectPins); Rtcs_Init(); } \ No newline at end of file diff --git a/PeripheralInterfaces.h b/PeripheralInterfaces.h index d7c632e..16d0d42 100644 --- a/PeripheralInterfaces.h +++ b/PeripheralInterfaces.h @@ -8,6 +8,7 @@ #include "Gpios.h" #include "SerialPorts.h" #include "CanPorts.h" +#include "SpiPorts.h" #include "Rtcs.h" void InitPeripheralInterfaces();