This commit is contained in:
MobKBK
2026-06-20 21:22:34 +08:00
commit 460e0e9e73
320 changed files with 135203 additions and 0 deletions

16
HARDWARE/adc.h Normal file
View File

@@ -0,0 +1,16 @@
#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