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