Files
MobKBK 460e0e9e73 init
2026-06-20 21:22:34 +08:00

17 lines
443 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#ifndef __ADC_H
#define __ADC_H
#include "sys.h"
#include "system.h"
#define Battery_Ch 8 //Battery voltage, ADC channel 8 //电池电压ADC通道8
#define Potentiometer 9 //Potentiometer, ADC channel 9 //电位器ADC通道9
void Adc_Init(void);
void Adc_POWER_Init(void);
u16 Get_Adc(u8 ch);
u16 Get_Adc2(u8 ch);
float Get_battery_volt(void) ;
u16 Get_adc_Average(u8 chn, u8 times);
extern float Voltage,Voltage_Count,Voltage_All;
#endif