Обновление
This commit is contained in:
parent
10b718cb0f
commit
b601ac91ad
12
Adcs.c
12
Adcs.c
|
|
@ -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;
|
||||||
|
|
||||||
|
|
@ -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
3
Adcs.h
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue