Files
xiaozhi-esp32/main/boards/common/axp2101.h
liyuaxue b0b471e27e add zhengchen_boards_wifi(征辰科技) (#635)
* add zhengchen_boards_wifi

* add zhengchen_boards_wifi1
2025-05-19 15:37:06 +08:00

21 lines
384 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();
float GetTemperature();
void PowerOff();
private:
int GetBatteryCurrentDirection();
};
#endif