123456789101112131415161718192021222324 |
- #ifndef __ADC_H_
- #define __ADC_H_
- #define MIN_PWR_LEVEL 320 //低于此电压后不工作
- #define WARN_PWR_LEVEL 330 //提示请充电电压
- #define VOL_ADC_PIN GPIO_Pin_0
- #define VOL_ADC_PORT GPIOB
- #define VOL_LEV_NUM 9
- #define VOL_LEV_DEF 10 //去抖范围
- extern int g_iVbat;
- void ADCInit(void);
- void PowerADCInit(void);
- void BatterProcess(void);
- int GetPowerVbat(void);
- unsigned short getBat(void);
- char SetSpkLvProcess(char update);
- #endif
|