//
// Created by ZK on 2023/3/14.
//

#include "InteriorADC.h"


bool InteriorADC_Init(void) {
    //使能ADC注入
    HAL_ADCEx_Calibration_Start(&hadc1, ADC_SINGLE_ENDED);
    HAL_ADCEx_Calibration_Start(&hadc2, ADC_SINGLE_ENDED);

    HAL_Delay(100);
    HAL_ADCEx_InjectedStart(&hadc1);
    __HAL_ADC_ENABLE_IT(&hadc1, ADC_IT_JEOC);
    HAL_ADCEx_InjectedStart(&hadc2);
    __HAL_ADC_ENABLE_IT(&hadc2, ADC_IT_JEOC);


    return 0;//返回值为零表示初始化成功
}