Files
xiaozhi-esp32-shhkAICam/main/boards/common/axp2101.h
0Xiao0 165219cee0
Some checks failed
Build Boards / Determine boards to build (push) Has been cancelled
Build Boards / Build ${{ matrix.board }} (push) Has been cancelled
first commit
2026-02-02 14:29:15 +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