Init
This commit is contained in:
parent
e0fb372c8b
commit
dd8caf4c53
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@ void InitPeripheralInterfaces() {
|
|||
Gpios_Init();
|
||||
SerialPorts_Init(&GPIOS.comIntDir);
|
||||
CanPorts_Init();
|
||||
SpiPorts_Init(&GPIOS.SpiChipSelectPins);
|
||||
Rtcs_Init();
|
||||
}
|
||||
|
|
@ -8,6 +8,7 @@
|
|||
#include "Gpios.h"
|
||||
#include "SerialPorts.h"
|
||||
#include "CanPorts.h"
|
||||
#include "SpiPorts.h"
|
||||
#include "Rtcs.h"
|
||||
|
||||
void InitPeripheralInterfaces();
|
||||
|
|
|
|||
Loading…
Reference in New Issue