adc.h 443 B

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