Обновление
This commit is contained in:
parent
da1279e6a8
commit
d6e7c81777
|
|
@ -3,6 +3,7 @@
|
||||||
//
|
//
|
||||||
#include "MainModesArbiter_Private.h"
|
#include "MainModesArbiter_Private.h"
|
||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
|
#include "fc7xxx_driver_rgm.h"
|
||||||
|
|
||||||
void Mma_Init(
|
void Mma_Init(
|
||||||
tMma *env,
|
tMma *env,
|
||||||
|
|
@ -42,12 +43,26 @@ static _Noreturn void Mma_Thread(tMma *env) {
|
||||||
int16_t temp1 = 0;
|
int16_t temp1 = 0;
|
||||||
int16_t temp2 = 0;
|
int16_t temp2 = 0;
|
||||||
|
|
||||||
|
if (RGM_SRS_WAKEUP_MASK == (RGM->SRS & RGM_SRS_WAKEUP_MASK)) {
|
||||||
|
LoggerInfoStatic(&env->slog.logger, LOG_TASK_ARB, "Wake up from standby")
|
||||||
|
}
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
||||||
SystemDelayMs(1000);
|
|
||||||
LoggerInfoStatic(&env->slog.logger, LOG_TASK_ARB, "Zorro...")
|
LoggerInfoStatic(&env->slog.logger, LOG_TASK_ARB, "Zorro...")
|
||||||
printf("Test Test Test Test Test Test Test Test Test Test XA XA ...\n");
|
printf("Test Test Test Test Test Test Test Test Test Test XA XA ...\n");
|
||||||
|
|
||||||
|
GpioPinToggle(&env->gpios->led.LED1);
|
||||||
|
|
||||||
|
SystemDelayMs(500);
|
||||||
|
|
||||||
|
/*
|
||||||
|
if (RGM_SRS_WAKEUP_MASK == (RGM->SRS & RGM_SRS_WAKEUP_MASK)) {
|
||||||
|
} else {
|
||||||
|
SMC_SetSystemMode(SMC_MODE_STANBY_3);
|
||||||
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if (osMutexAcquire(env->adcTask0.access, 1000) == osOK) {
|
if (osMutexAcquire(env->adcTask0.access, 1000) == osOK) {
|
||||||
temp1 = get_temperature_fast(env->adcTask0.ADC_Data[0], fast_lookup_Incar, 512);
|
temp1 = get_temperature_fast(env->adcTask0.ADC_Data[0], fast_lookup_Incar, 512);
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
#include "Lins.h"
|
#include "Lins.h"
|
||||||
#include "LinTasks.h"
|
#include "LinTasks.h"
|
||||||
#include "AdcTasks.h"
|
#include "AdcTasks.h"
|
||||||
|
#include "standby.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -57,6 +58,8 @@ typedef struct {
|
||||||
tAdcTask adcTask0;
|
tAdcTask adcTask0;
|
||||||
tAdcTask adcTask1;
|
tAdcTask adcTask1;
|
||||||
|
|
||||||
|
tStandBy standBy;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
osThreadId_t id;
|
osThreadId_t id;
|
||||||
uint32_t stack[1024 * 1];
|
uint32_t stack[1024 * 1];
|
||||||
|
|
|
||||||
|
|
@ -89,6 +89,7 @@ static void Mma_InitSubSystems(tMma *env) {
|
||||||
Adc_1_Init(&env->adcTask1, &env->adcs->adc_1_IO);
|
Adc_1_Init(&env->adcTask1, &env->adcs->adc_1_IO);
|
||||||
Adc_1_StartThread(&env->adcTask1);
|
Adc_1_StartThread(&env->adcTask1);
|
||||||
|
|
||||||
|
StandBy_Init(&env->standBy);
|
||||||
|
|
||||||
LoggerInfoStatic(&env->slog.logger, LOG_TASK_MAIN, "End of subsystem initialization")
|
LoggerInfoStatic(&env->slog.logger, LOG_TASK_MAIN, "End of subsystem initialization")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue