forked from xiaozhi/xiaozhi-esp32
lilygo-t-cameraplus-s3 add pmic (#586)
This commit is contained in:
21
main/boards/common/sy6970.h
Normal file
21
main/boards/common/sy6970.h
Normal file
@@ -0,0 +1,21 @@
|
||||
#ifndef __SY6970_H__
|
||||
#define __SY6970_H__
|
||||
|
||||
#include "i2c_device.h"
|
||||
|
||||
class Sy6970 : public I2cDevice {
|
||||
public:
|
||||
Sy6970(i2c_master_bus_handle_t i2c_bus, uint8_t addr);
|
||||
bool IsCharging();
|
||||
bool IsPowerGood();
|
||||
bool IsChargingDone();
|
||||
int GetBatteryLevel();
|
||||
void PowerOff();
|
||||
|
||||
private:
|
||||
int GetChangingStatus();
|
||||
int GetBatteryVoltage();
|
||||
int GetChargeTargetVoltage();
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user