158 lines
3.1 KiB
C
158 lines
3.1 KiB
C
//
|
|
// Created by xemon on 19.09.22.
|
|
//
|
|
|
|
#ifndef UVEOS_ON_NATION_MMA_H
|
|
#define UVEOS_ON_NATION_MMA_H
|
|
|
|
//Железные интерфесы
|
|
#include "PeripheralInterfaces.h"
|
|
|
|
//Переферийные устройства
|
|
#include <DeviceStorageIni.h>
|
|
//#include <AudioCodec.h>
|
|
//#include <Accel.h>
|
|
//#include <GsmWithGnss.h>
|
|
|
|
//Подсистемы
|
|
#include <PowerManagement.h>
|
|
#include <LoggerToSerialPort.h>
|
|
#include <ComInt.h>
|
|
//#include <ComandLineInterface.h>
|
|
//#include <DeviceTesting.h>
|
|
//#include <CrashDetection.h>
|
|
//#include <EraGlonassUveos.h>
|
|
#include "cmsis_os.h"
|
|
#include "CmsisRtosThreadUtils.h"
|
|
#include "SystemDelayInterface.h"
|
|
#include "Rtcs.h"
|
|
#include "UserIndication.h"
|
|
#include "Gnss.h"
|
|
#include "ff.h"
|
|
#include "fs_interface.h"
|
|
#include <FirmwareLoader.h>
|
|
#include "Tracert.h"
|
|
#include "fs_base_func.h"
|
|
#include "ModemGonec.h"
|
|
#include "ModemMain.h"
|
|
#include "file_logger.h"
|
|
#include "ModemLog.h"
|
|
#include "TaskAdc.h"
|
|
#include "Gpios.h"
|
|
#include "Us.h"
|
|
#include "DeviceStorageIni.h"
|
|
#include "External.h"
|
|
#include "Modem_Timer.h"
|
|
#include "TaskMsd.h"
|
|
|
|
|
|
typedef struct {
|
|
|
|
struct {
|
|
osThreadId_t id;
|
|
uint32_t stack[4096];
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
|
|
} tTaskTcpLoop;
|
|
|
|
void TaskTcpLoop_Init(
|
|
tTaskTcpLoop *env
|
|
);
|
|
|
|
void TaskTcpLoop_StartThread(tTaskTcpLoop *env);
|
|
|
|
typedef struct {
|
|
|
|
// Преферийные интерфесы
|
|
tGpios *gpios;
|
|
tAdcs *adcs;
|
|
tSerialPorts *serialPorts;
|
|
tStorageOnFlash *flash;
|
|
tRtcs *rtcs;
|
|
tFs fs;
|
|
tFirmwareLoader *firmwareMainLoader;
|
|
tFirmwareLoader *firmwareBootLoader;
|
|
osMutexId_t accessMODEM_GSM;
|
|
osMutexId_t accessHTTP;
|
|
osMutexId_t accessMODEM;
|
|
osMutexId_t accessLOG;
|
|
osMutexId_t accessLOG2;
|
|
osMutexId_t accessTracert;
|
|
|
|
// Преферийные устройства
|
|
// tDeviceStorage storage;
|
|
|
|
tDeviceStorageIni storageIni;
|
|
|
|
tPowerManagement power;
|
|
// tAudioCodec audioCodec;
|
|
// tGsmWithGnss gsmWithGnss;
|
|
// tAccel accel;
|
|
|
|
//Подсистемы
|
|
tFileLogger flog;
|
|
tFileLogger flog2;
|
|
tSerialPortIO flog_serial;
|
|
tSerialPortIO flog_serial2;
|
|
tLoggerToSerialPort slog;
|
|
tLoggerToSerialPort slog2;
|
|
|
|
// tUserInput userInput;
|
|
tUserIndication indication;
|
|
tComInt comInt;
|
|
// tCli cli;
|
|
// tCli cliVrt;
|
|
|
|
// tDeviceTesting testing;
|
|
|
|
// tCrashDetection crashDetect;
|
|
// tEraGlonassUveos uveos;
|
|
|
|
tGnss gnss;
|
|
|
|
|
|
tTaskTcpLoop taskTcpLoop;
|
|
|
|
tTaskAdc taskAdc;
|
|
tTracertMain tracertMain;
|
|
|
|
tExternal external;
|
|
tTaskMsd taskMsd;
|
|
|
|
tModemMain modemMain;
|
|
tModemMainLog modemMainLog;
|
|
tModemTimer modemTimer;
|
|
|
|
tUs us;
|
|
|
|
struct {
|
|
osThreadId_t id;
|
|
uint32_t stack[2048 * 2];
|
|
StaticTask_t controlBlock;
|
|
osThreadAttr_t attr;
|
|
} thread;
|
|
|
|
|
|
|
|
|
|
} tMma;
|
|
|
|
|
|
void Mma_Init(
|
|
tMma *env,
|
|
tGpios *gpios,
|
|
tAdcs *adcs,
|
|
tSerialPorts *serialPorts,
|
|
tRtcs *rtcs,
|
|
tStorageOnFlash *flash,
|
|
tFirmwareLoader *firmwareMainLoader,
|
|
tFirmwareLoader *firmwareBootLoader
|
|
);
|
|
|
|
void Mma_StartThread(tMma *env);
|
|
|
|
|
|
#endif //UVEOS_ON_NATION_MMA_H
|