/* ****************************************************************************** * * @file adc.h * @brief adc module * * * @version 1.0 * @date 2023/05/12 09:59:40 * @author Alex Xu * * Copyright (c) 2013-2099,Tkplusemi Technology Co.,Ltd. * All Rights Reserved * * History: * Revision Date Author Desc * 1.0.0 2023/07/12 Alex build this file ****************************************************************************** */ #ifndef __ADC_H__ #define __ADC_H__ #include "define.h" #if ADC_ENABLE #define VREF 1000 //extern idata uint16_t g_VREF_Value; //IREF 系统上电时采集一次。 extern uint16_t Vbat_Value(void); extern void Adc_Init(void); extern uint16_t Vref_AdcValue(void); #if ADC_CHN_ENABLE typedef enum { ADC_CH0 = 0x00, ADC_CH1, ADC_CH2, ADC_CH3, ADC_CH4, }ADC_CHANNELS_E; extern uint16_t ADC_Chn_Value(ADC_CHANNELS_E adc_chn); #endif #endif #endif