adc.h 472 B

12345678910111213141516171819202122232425
  1. #ifndef __ADC_H_
  2. #define __ADC_H_
  3. #define MIN_PWR_LEVEL 315 //低于此电压后不工作
  4. #define WARN_PWR_LEVEL 325 //提示请充电电压 325
  5. #define VOL_ADC_PIN GPIO_Pin_0
  6. #define VOL_ADC_PORT GPIOB
  7. #define VOL_LEV_NUM 11
  8. #define VOL_LEV_DEF 10 //去抖范围
  9. extern int g_iVbat;
  10. void ADCInit(void);
  11. void KEYADCInit(void);
  12. int GetKeyVbat(void);
  13. int GetPowerVbat(void);
  14. void BatterProcess(void);
  15. unsigned short getBat(void);
  16. char SetSpkLvProcess(char update);
  17. #endif