ESP_IOT v2.5
IOT ESP Coding
battery.h
Go to the documentation of this file.
1#ifdef LOOK_AT_THIS_TO_SEE_IF_CAN_USE
2
3#pragma once
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#include "stdint.h"
10
11// Init bat hold gpio, adc gpio
12void bat_init();
13
14// Enable battery power supply if USB is unplugged
15void bat_hold_output();
16
17// Disable battery power supply if USB is unplugged
18void bat_disable_output();
19
20// return: 0 ~ 4096
21uint32_t bat_get_adc_raw();
22
23// return: xxxx mv
24uint32_t bat_get_voltage();
25
26#ifdef __cplusplus
27}
28#endif
29
30#endif