Decection.h 569 B

12345678910111213141516171819202122
  1. #ifndef _DETECTION_H_
  2. #define _DETECTION_H_
  3. #include "esp_adc/adc_oneshot.h"
  4. #include "esp_adc/adc_cali.h"
  5. #include "esp_adc/adc_cali_scheme.h"
  6. typedef struct batt_map{
  7. int vol;//电压
  8. int pre;//百分比
  9. }batt_map;
  10. int adc_read_power_pin(adc_oneshot_unit_handle_t adc_handle);
  11. int read_battery_voltage();
  12. int decection_state_0(void);
  13. int decection_state_1(void);
  14. // void decection_charging_init(void);
  15. // void decection_charging_deinit(void);
  16. int adc_read_left_key_pin(adc_oneshot_unit_handle_t adc_handle);
  17. #endif/*_DETECTION_H_*/