change battery measurement, add battery monitor

This commit is contained in:
sharandac
2020-07-20 16:49:14 +02:00
parent d9e8b89562
commit 017453b889
21 changed files with 663 additions and 60 deletions

View File

@@ -3,6 +3,8 @@
#define PMU_EVENT_AXP_INT _BV(0)
#define PMU_BATTERY_CAP 380
/*
* @brief setup pmu: axp202
*
@@ -15,5 +17,14 @@
* @param ttgo pointer to an TTGOClass
*/
void pmu_loop( TTGOClass *ttgo );
/*
*
* @brief get the charge of battery in percent
*
* @param ttgo pointer to an TTGOClass
*
* @return charge in percent
*/
uint32_t pmu_get_byttery_percent( TTGOClass *ttgo );
#endif // _PMU_H