add zhengchen_boards_wifi(征辰科技) (#635)

* add zhengchen_boards_wifi

* add zhengchen_boards_wifi1
This commit is contained in:
liyuaxue
2025-05-19 15:37:06 +08:00
committed by GitHub
parent 538e07aa70
commit b0b471e27e
13 changed files with 677 additions and 0 deletions

View File

@@ -30,6 +30,10 @@ int Axp2101::GetBatteryLevel() {
return ReadReg(0xA4);
}
float Axp2101::GetTemperature() {
return ReadReg(0xA5);
}
void Axp2101::PowerOff() {
uint8_t value = ReadReg(0x10);
value = value | 0x01;

View File

@@ -10,6 +10,7 @@ public:
bool IsDischarging();
bool IsChargingDone();
int GetBatteryLevel();
float GetTemperature();
void PowerOff();
private:

View File

@@ -48,6 +48,10 @@ bool Board::GetBatteryLevel(int &level, bool& charging, bool& discharging) {
return false;
}
bool Board::GetTemperature(float& esp32temp){
return false;
}
Display* Board::GetDisplay() {
static NoDisplay display;
return &display;

View File

@@ -37,6 +37,7 @@ public:
virtual Backlight* GetBacklight() { return nullptr; }
virtual Led* GetLed();
virtual AudioCodec* GetAudioCodec() = 0;
virtual bool GetTemperature(float& esp32temp);
virtual Display* GetDisplay();
virtual Http* CreateHttp() = 0;
virtual WebSocket* CreateWebSocket() = 0;