forked from xiaozhi/xiaozhi-esp32
Added functionality to Waveshare ESP32-S3-Touch-AMOLED-1.8 (#228)
* Added functionality to Waveshare ESP32-S3-Touch-AMOLED-1.8 * Update board_control.cc 不要提交没有使用的功能到main分支 --------- Co-authored-by: Xiaoxia <terrence@tenclass.com>
This commit is contained in:
19
main/boards/esp32-s3-touch-amoled-1.8/axp2101.h
Normal file
19
main/boards/esp32-s3-touch-amoled-1.8/axp2101.h
Normal 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
|
||||
Reference in New Issue
Block a user