Обновление

This commit is contained in:
cfif 2026-02-05 10:59:40 +03:00
parent 10b718cb0f
commit b601ac91ad
2 changed files with 15 additions and 4 deletions

16
Adcs.c
View File

@ -5,6 +5,8 @@
#include "fc7xxx_driver_port.h" #include "fc7xxx_driver_port.h"
#include "Adcs.h" #include "Adcs.h"
#define LOG_SIGN "INIT"
#define LOGGER logger
tAdcs ADCS; tAdcs ADCS;
@ -133,8 +135,8 @@ static const ADC_ChannelCfgType s_aChannelsAdc0[ADC0_CHN_NUM_EN] =
}, },
{ {
.eChannel = ADC_CHANNEL_23, //PE19: BTS5120_2EKA_ShutoffValvePowerTXV .eChannel = ADC_CHANNEL_23, //PE19: BTS5120_2EKA_ShutoffValvePowerTXV
.eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_1 .eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_1
}, },
{ {
@ -226,7 +228,7 @@ static const ADC_ChannelCfgType s_aChannelsAdc1[ADC1_CHN_NUM_EN] =
}; };
*/ */
void Adcs_Init() { void Adcs_Init(tLoggerInterface *logger) {
tAdcs *env = &ADCS; tAdcs *env = &ADCS;
PORT_InitType tInitStruct = {0}; PORT_InitType tInitStruct = {0};
@ -267,6 +269,10 @@ void Adcs_Init() {
Bsp_ADC0_HandleResult Bsp_ADC0_HandleResult
); );
LoggerInfoStatic(LOGGER, LOG_SIGN, "Initialization ADC0 - OK")
env->adc_0_IO = vAdcGetIo(&env->adc_0); env->adc_0_IO = vAdcGetIo(&env->adc_0);
// PTB9: ADC1_SE25 // PTB9: ADC1_SE25
@ -298,5 +304,9 @@ void Adcs_Init() {
Bsp_ADC1_HandleResult Bsp_ADC1_HandleResult
); );
LoggerInfoStatic(LOGGER, LOG_SIGN, "Initialization ADC1 - OK")
env->adc_1_IO = vAdcGetIo(&env->adc_1); env->adc_1_IO = vAdcGetIo(&env->adc_1);
} }

3
Adcs.h
View File

@ -6,6 +6,7 @@
#define FLAG_ADCS_H #define FLAG_ADCS_H
#include "AdcFlagchip.h" #include "AdcFlagchip.h"
#include "LoggerInterface.h"
typedef struct { typedef struct {
tAdcFlagchip adc_0; tAdcFlagchip adc_0;
@ -17,6 +18,6 @@ typedef struct {
extern tAdcs ADCS; extern tAdcs ADCS;
void Adcs_Init(); void Adcs_Init(tLoggerInterface *logger);
#endif //FLAG_ADCS_H #endif //FLAG_ADCS_H