wangrong
2026-08-24 beef6536e7c8dd3f5cbe8f73585611479910bea7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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