Add tbeam esp32s3 version support, replace AXP202X_Library with XPowersLIb

This commit is contained in:
lewishe
2022-09-06 15:58:33 +08:00
parent f767fd5075
commit 5621719eef
20 changed files with 473 additions and 257 deletions

View File

@@ -3,8 +3,9 @@
#include <Wire.h>
#include "mesh/generated/telemetry.pb.h"
#ifdef HAS_AXP192
#include "axp20x.h"
#ifndef XPOWERS_AXP192_AXP2101_ADDRESS
#define XPOWERS_AXP192_AXP2101_ADDRESS 0x34
#endif
#if HAS_WIRE
@@ -114,10 +115,10 @@ void scanI2Cdevice(void)
screen_found = addr;
DEBUG_MSG("st7567 display found\n");
}
#ifdef HAS_AXP192
if (addr == AXP192_SLAVE_ADDRESS) {
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
if (addr == XPOWERS_AXP192_AXP2101_ADDRESS) {
axp192_found = true;
DEBUG_MSG("axp192 PMU found\n");
DEBUG_MSG("axp192/axp2101 PMU found\n");
}
#endif
if (addr == BME_ADDR || addr == BME_ADDR_ALTERNATE) {