sy6970.h 403 B

123456789101112131415161718192021
  1. #ifndef __SY6970_H__
  2. #define __SY6970_H__
  3. #include "i2c_device.h"
  4. class Sy6970 : public I2cDevice {
  5. public:
  6. Sy6970(i2c_master_bus_handle_t i2c_bus, uint8_t addr);
  7. bool IsCharging();
  8. bool IsPowerGood();
  9. bool IsChargingDone();
  10. int GetBatteryLevel();
  11. void PowerOff();
  12. private:
  13. int GetChangingStatus();
  14. int GetBatteryVoltage();
  15. int GetChargeTargetVoltage();
  16. };
  17. #endif