SMART_COMPONENTS_ComInt/ComInt.h

94 lines
2.3 KiB
C

//
// Created by cfif on 04.10.2022.
//
#ifndef XFCTRANSPACKSINGLESERVICERESPONDENTTASK_H
#define XFCTRANSPACKSINGLESERVICERESPONDENTTASK_H
#include <SerialPortIO.h>
#include <XfcProtTable.h>
#include <DeviceTestsTable.h>
#include <DeviceStorage.h>
#include "XfcProtRespondent.h"
#include "ComIntCmd/Mandatory.h"
#include "ComIntCmd/SerialBridge.h"
#include "VersionsInfoTable.h"
#include "ComIntCmd/AccelCalibration.h"
#include "Amplifier.h"
#include "ComIntAmplifier.h"
#include "ComIntCodec.h"
#include "ComIntPowerManager.h"
#include "ComIntThisSubSystem.h"
#include "ComIntTest.h"
typedef struct {
tSerialPortIO *serialPortIo;
tSerialPortIO *serialCanPortIo;
struct {
tXfcProtProcessor table[34];
#ifndef COM_INT_BIG_BUFFERS
uint8_t rxArr[256];
uint8_t txArr[2048];
#else
uint8_t rxArr[1024 * 10];
uint8_t txArr[1024 * 10];
#endif
tSerialBridge serialBridge[8];
tVersionPair versions[3];
} memAlloc;
tXfcProtTable table;
tXfcProtRespondent service;
tSerialBridges serialBridges;
tVersionsInfoTable versionsTable;
tAccelCalibData accelCalibData;
tXfcAmplifier Amplifier;
tXfcCodec Codec;
tXfcTest TestButton;
tXfcPower Power;
tXfcSybSystem XfcSybSystem;
struct {
tStringStatic board;
tStringStatic serialNumber;
tStringStatic firmware;
tStringStatic gsm;
} versions;
tComIntPing ping;
struct {
osThreadId_t id;
uint32_t stack[1536];
StaticTask_t controlBlock;
osThreadAttr_t attr;
} thread;
} tComInt;
void ComInt_Init(
tComInt *env,
tSerialPortIO *io,
tSerialPortIO *canIo,
tString16 *deviceId,
tVariablesTable *varsTab,
tDeviceTestsTable *tests,
tSerialPortIO *gsmIo,
tSerialPortIO *cliIo,
tSerialPortIO *gnssIo,
tStringLink *currentModeName,
tCarFlipDetection *carFlipDetection,
tAmplifier *Amplifier,
tAudioCodec *audioCodec,
tDeviceTesting *deviceTesting,
tPowerManagement *power,
bool *playMode,
eSubSystems *subSystem,
bool *telematicaIsActive,
bool *telematicaServerIsActive,
bool *factoryMode
);
void ComInt_StartThread(tComInt *env);
#endif //XFCTRANSPACKSINGLESERVICERESPONDENTTASK_H