12345678910111213141516171819202122 |
- #ifndef _DETECTION_H_
- #define _DETECTION_H_
- #include "esp_adc/adc_oneshot.h"
- #include "esp_adc/adc_cali.h"
- #include "esp_adc/adc_cali_scheme.h"
- typedef struct batt_map{
- int vol;//电压
- int pre;//百分比
- }batt_map;
- int adc_read_power_pin(adc_oneshot_unit_handle_t adc_handle);
- int read_battery_voltage();
- int decection_state_0(void);
- int decection_state_1(void);
- // void decection_charging_init(void);
- // void decection_charging_deinit(void);
- int adc_read_left_key_pin(adc_oneshot_unit_handle_t adc_handle);
- #endif/*_DETECTION_H_*/
|