diff --git a/Adcs.c b/Adcs.c index 25779b4..b9ea828 100644 --- a/Adcs.c +++ b/Adcs.c @@ -5,6 +5,8 @@ #include "fc7xxx_driver_port.h" #include "Adcs.h" +#define LOG_SIGN "INIT" +#define LOGGER logger tAdcs ADCS; @@ -133,8 +135,8 @@ static const ADC_ChannelCfgType s_aChannelsAdc0[ADC0_CHN_NUM_EN] = }, { - .eChannel = ADC_CHANNEL_23, //PE19: BTS5120_2EKA_ShutoffValvePowerTXV - .eSampleTimeOption = ADC_SAMPLE_TIME_OPTION_1 + .eChannel = ADC_CHANNEL_23, //PE19: BTS5120_2EKA_ShutoffValvePowerTXV + .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; PORT_InitType tInitStruct = {0}; @@ -267,6 +269,10 @@ void Adcs_Init() { Bsp_ADC0_HandleResult ); + + LoggerInfoStatic(LOGGER, LOG_SIGN, "Initialization ADC0 - OK") + + env->adc_0_IO = vAdcGetIo(&env->adc_0); // PTB9: ADC1_SE25 @@ -298,5 +304,9 @@ void Adcs_Init() { Bsp_ADC1_HandleResult ); + + LoggerInfoStatic(LOGGER, LOG_SIGN, "Initialization ADC1 - OK") + + env->adc_1_IO = vAdcGetIo(&env->adc_1); } diff --git a/Adcs.h b/Adcs.h index 0eca67c..42499a5 100644 --- a/Adcs.h +++ b/Adcs.h @@ -6,6 +6,7 @@ #define FLAG_ADCS_H #include "AdcFlagchip.h" +#include "LoggerInterface.h" typedef struct { tAdcFlagchip adc_0; @@ -17,6 +18,6 @@ typedef struct { extern tAdcs ADCS; -void Adcs_Init(); +void Adcs_Init(tLoggerInterface *logger); #endif //FLAG_ADCS_H