mirror of
https://github.com/78/xiaozhi-esp32.git
synced 2026-01-14 09:17:20 +08:00
* add tudouzi board * Update Kconfig.projbuild fix spaces --------- Co-authored-by: Xiaoxia <terrence@tenclass.com>
20 lines
356 B
C++
20 lines
356 B
C++
#ifndef __AXP2101_H__
|
|
#define __AXP2101_H__
|
|
|
|
#include "i2c_device.h"
|
|
|
|
class Axp2101 : public I2cDevice {
|
|
public:
|
|
Axp2101(i2c_master_bus_handle_t i2c_bus, uint8_t addr);
|
|
bool IsCharging();
|
|
bool IsDischarging();
|
|
bool IsChargingDone();
|
|
int GetBatteryLevel();
|
|
void PowerOff();
|
|
|
|
private:
|
|
int GetBatteryCurrentDirection();
|
|
};
|
|
|
|
#endif
|