67 lines
1.2 KiB
C
67 lines
1.2 KiB
C
//
|
|
// Created by cfif on 05.05.23.
|
|
//
|
|
|
|
#ifndef WATER_BOX_BSD_MAINMODESARBITER_H
|
|
#define WATER_BOX_BSD_MAINMODESARBITER_H
|
|
|
|
#include "CmsisRtosThreadUtils.h"
|
|
|
|
//Железные интерфейсы
|
|
#include "PeripheralInterfaces.h"
|
|
|
|
//Подсистемы
|
|
#include "PowerManagement.h"
|
|
#include "Rtcs.h"
|
|
#include "LoggerToSerialPort.h"
|
|
#include "ComInt.h"
|
|
#include "Indication.h"
|
|
#include "CommandLines.h"
|
|
#include "DeviceStorage.h"
|
|
|
|
|
|
typedef struct {
|
|
// Преферийные интерфесы
|
|
tGpios *gpios;
|
|
tSerialPorts *serialPorts;
|
|
tCanPorts *canPorts;
|
|
tLoggerToSerialPort slog;
|
|
tComInt comInt;
|
|
tStorageOnFlash *flash;
|
|
|
|
tRtcs *rtcs;
|
|
tAdcs *adcs;
|
|
|
|
tDeviceStorage storage;
|
|
|
|
tPowerManagement power;
|
|
|
|
tCommandLine cli;
|
|
|
|
tIndication Indication;
|
|
|
|
struct {
|
|
osThreadId_t id;
|
|
uint32_t stack[2048 * 1];
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
|
|
uint8_t data[46];
|
|
|
|
uint8_t BufFileWrite[512];
|
|
} tMma;
|
|
|
|
void Mma_Init(
|
|
tMma *env,
|
|
tGpios *gpios,
|
|
tAdcs *adcs,
|
|
tSerialPorts *serialPorts,
|
|
tCanPorts *canPorts,
|
|
tRtcs *rtcs
|
|
);
|
|
|
|
void Mma_StartThread(tMma *env);
|
|
|
|
#endif //WATER_BOX_BSD_MAINMODESARBITER_H
|