Init
This commit is contained in:
parent
e0fb372c8b
commit
dd8caf4c53
|
|
@ -8,11 +8,13 @@ void Mma_Init(
|
||||||
tGpios *gpios,
|
tGpios *gpios,
|
||||||
tSerialPorts *serialPorts,
|
tSerialPorts *serialPorts,
|
||||||
tCanPorts *canPorts,
|
tCanPorts *canPorts,
|
||||||
|
tSpiPorts *spiPorts,
|
||||||
tRtcs *rtcs
|
tRtcs *rtcs
|
||||||
) {
|
) {
|
||||||
env->gpios = gpios;
|
env->gpios = gpios;
|
||||||
env->serialPorts = serialPorts;
|
env->serialPorts = serialPorts;
|
||||||
env->canPorts = canPorts;
|
env->canPorts = canPorts;
|
||||||
|
env->spiPorts = spiPorts;
|
||||||
env->rtcs = rtcs;
|
env->rtcs = rtcs;
|
||||||
|
|
||||||
InitThreadAtrStatic(&env->thread.attr, "Mma", env->thread.controlBlock, env->thread.stack, osPriorityNormal);
|
InitThreadAtrStatic(&env->thread.attr, "Mma", env->thread.controlBlock, env->thread.stack, osPriorityNormal);
|
||||||
|
|
|
||||||
|
|
@ -19,11 +19,13 @@
|
||||||
#include "Indication.h"
|
#include "Indication.h"
|
||||||
#include "CommandLines.h"
|
#include "CommandLines.h"
|
||||||
#include "ArbiterCommand.h"
|
#include "ArbiterCommand.h"
|
||||||
|
#include "SpiPorts.h"
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// Преферийные интерфесы
|
// Преферийные интерфесы
|
||||||
tGpios *gpios;
|
tGpios *gpios;
|
||||||
tSerialPorts *serialPorts;
|
tSerialPorts *serialPorts;
|
||||||
|
tSpiPorts *spiPorts;
|
||||||
tCanPorts *canPorts;
|
tCanPorts *canPorts;
|
||||||
tLoggerToSerialPortV2 slog;
|
tLoggerToSerialPortV2 slog;
|
||||||
tComInt comInt;
|
tComInt comInt;
|
||||||
|
|
@ -64,6 +66,7 @@ void Mma_Init(
|
||||||
tGpios *gpios,
|
tGpios *gpios,
|
||||||
tSerialPorts *serialPorts,
|
tSerialPorts *serialPorts,
|
||||||
tCanPorts *canPorts,
|
tCanPorts *canPorts,
|
||||||
|
tSpiPorts *spiPorts,
|
||||||
tRtcs *rtcs
|
tRtcs *rtcs
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,5 +9,6 @@ void InitPeripheralInterfaces() {
|
||||||
Gpios_Init();
|
Gpios_Init();
|
||||||
SerialPorts_Init(&GPIOS.comIntDir);
|
SerialPorts_Init(&GPIOS.comIntDir);
|
||||||
CanPorts_Init();
|
CanPorts_Init();
|
||||||
|
SpiPorts_Init(&GPIOS.SpiChipSelectPins);
|
||||||
Rtcs_Init();
|
Rtcs_Init();
|
||||||
}
|
}
|
||||||
|
|
@ -8,6 +8,7 @@
|
||||||
#include "Gpios.h"
|
#include "Gpios.h"
|
||||||
#include "SerialPorts.h"
|
#include "SerialPorts.h"
|
||||||
#include "CanPorts.h"
|
#include "CanPorts.h"
|
||||||
|
#include "SpiPorts.h"
|
||||||
#include "Rtcs.h"
|
#include "Rtcs.h"
|
||||||
|
|
||||||
void InitPeripheralInterfaces();
|
void InitPeripheralInterfaces();
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue