add tudouzi board (#85)

* add tudouzi board

* Update Kconfig.projbuild

fix spaces

---------

Co-authored-by: Xiaoxia <terrence@tenclass.com>
This commit is contained in:
Kevincoooool
2025-01-28 09:23:52 +08:00
committed by GitHub
parent f0a683578a
commit 3816f7eb57
6 changed files with 337 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
#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