Изменения на новые настройки пинов и устройств

This commit is contained in:
cfif 2025-05-28 15:16:06 +03:00
parent fe1f61a17f
commit 5be839764d
5 changed files with 15 additions and 37 deletions

View File

@ -3,7 +3,6 @@
// Created by xemon on 19.09.22.
//
#include "MainModesArbiter_Private.h"
#include "Flash_MT29F2G01ABAGDWB.h"
#include "http_server.h"
#include "at32_emac.h"
#include "netconf.h"
@ -123,7 +122,6 @@ void Mma_Init(
tGpios *gpios,
tAdcs *adcs,
tSerialPorts *serialPorts,
tSpiPorts *spiPorts,
tRtcs *rtcs,
tStorageOnFlash *flash,
tFirmwareLoader *firmwareMainLoader,
@ -134,7 +132,6 @@ void Mma_Init(
env->adcs = adcs;
env->serialPorts = serialPorts;
// env->i2cPorts = i2cPorts;
env->spiPorts = spiPorts;
env->rtcs = rtcs;
env->flash = flash;
env->firmwareMainLoader = firmwareMainLoader;
@ -439,7 +436,7 @@ static _Noreturn void Mma_Thread(tMma *env) {
// while (status == ERROR);
// tcpip_stack_init();
httpd_init(&env->external, &env->rtcs->rtcI0, &env->taskAdc, &env->storageIni, &env->fs, env->spiPorts,
httpd_init(&env->external, &env->rtcs->rtcI0, &env->taskAdc, &env->storageIni, &env->fs,
env->firmwareMainLoader,
env->firmwareBootLoader,
&env->modemMain,
@ -547,6 +544,8 @@ static _Noreturn void Mma_Thread(tMma *env) {
}
*/
bool state = GpioPinGet(&env->gpios->SIM68Power.ppc_mcu);
lwip_periodic_handle(SystemGetMs());
sys_check_timeouts();

View File

@ -69,7 +69,6 @@ typedef struct {
tGpios *gpios;
tAdcs *adcs;
tSerialPorts *serialPorts;
tSpiPorts *spiPorts;
tStorageOnFlash *flash;
tRtcs *rtcs;
tFs fs;
@ -146,7 +145,6 @@ void Mma_Init(
tGpios *gpios,
tAdcs *adcs,
tSerialPorts *serialPorts,
tSpiPorts *spiPorts,
tRtcs *rtcs,
tStorageOnFlash *flash,
tFirmwareLoader *firmwareMainLoader,

View File

@ -127,8 +127,9 @@ static void Mma_InitSubSystems(tMma *env) {
ComInt_Init(
&env->comInt,
&env->serialPorts->ComIntHalfDuplexIo,
// &env->serialPorts->SIM800FIOSniffer,
&env->serialPorts->GONEC1IOSniffer,
&env->serialPorts->SIM7682EIOSniffer,
&env->serialPorts->SIM68IOSniffer,
// &env->serialPorts->GONEC1IOSniffer,
&env->serialPorts->cliVirtualOutIo,
&env->indication.currentModeName
);
@ -138,7 +139,7 @@ static void Mma_InitSubSystems(tMma *env) {
TaskAdc_Init(&env->taskAdc, env->adcs);
Gnss_Init(&env->gnss, &env->serialPorts->PRO04IO);
Gnss_Init(&env->gnss, &env->serialPorts->SIM68IO);
env->gnss.rtcIo = &env->rtcs->rtcI0;
env->gnss.GMTcorr_v = env->storageIni.nvm.Settings_General.GMTcorr_v;
env->gnss.logger = &env->slog.logger;
@ -160,7 +161,7 @@ static void Mma_InitSubSystems(tMma *env) {
&env->modemMain,
env->gpios,
&env->serialPorts->GONEC1IO,
&env->serialPorts->SIM800FIO,
&env->serialPorts->SIM7682EIO,
&env->gnss,
&env->storageIni,
&env->flog,
@ -309,44 +310,26 @@ static void Mma_RunSubThreads(tMma *env) {
// UserInput_StartThread(&env->userInput);
//ComInt_StartThread(&env->comInt);
// VarsTabDumpObserver_StartThread(&env->storage.dumpObserver);
// Accel_StartThread(&env->accel);
// CrashDetection_StartThread(&env->crashDetect);
// Cli_StartThread(&env->cli);
// Cli_StartThread(&env->cliVrt);
ComInt_StartThread(&env->comInt);
// TracertMain_StartThread(&env->tracertMain);
// External_StartThread(&env->external);
// ModemMain_StartThread(&env->modemMain);
Gnss_StartThread(&env->gnss);
// TracertSensor_StartThread(&env->tracertSensor);
TracertMain_StartThread(&env->tracertMain);
External_StartThread(&env->external);
ModemMain_StartThread(&env->modemMain);
ModemMainLog_StartThread(&env->modemMainLog);
ModemTimer_StartThread(&env->modemTimer);
TaskAdc_StartThread(&env->taskAdc);
Us_StartThread(&env->us);
TaskMsd_StartThread(&env->taskMsd);
// LoggerInfoStatic(LOGGER, LOG_SIGN, "Субпотоки запущены")
}
static void Mma_InitPower(tMma *env) {
Pwm_Init(&env->power, &env->gpios->Power, &env->gpios->SIM800FPower, &env->gpios->PRO04Power);
Pwm_Init(&env->power, &env->gpios->Power, &env->gpios->SIM7682EPower, &env->gpios->SIM68Power);
Pwm_Power(&env->power);
Pwm_SIM800FStartup(&env->power);
Pwm_PRO04Startup(&env->power);
Pwm_SIM7682EStartup(&env->power);
Pwm_SIM68Startup(&env->power);
}
static void Mma_InitLogger(tMma *env) {

View File

@ -7,7 +7,6 @@ void InitPeripheralInterfaces() {
Gpios_Init();
Adcs_Init();
SerialPorts_Init(&GPIOS.comIntDir);
SpiPorts_Init(&GPIOS.flashSPI);
Rtcs_Init();
StorageOnFlash_Init();
}

View File

@ -8,7 +8,6 @@
#include <Gpios.h>
#include "Adcs.h"
#include <SerialPorts.h>
#include <SpiPorts.h>
#include <StorageOnFlash.h>
#include "Rtcs.h"