Repair the sharing of Wire1 between RTC and PMU in tbeams3

This commit is contained in:
lewishe
2022-11-12 15:12:53 +08:00
parent b68a026627
commit cd95d0865f
2 changed files with 16 additions and 1 deletions

View File

@@ -246,6 +246,13 @@ void setup()
// In T-Beam-S3-core, the I2C device cannot be scanned before power initialization, otherwise the device will be stuck
if ((HW_VENDOR != HardwareModel_LILYGO_TBEAM_S3_CORE)) {
scanI2Cdevice();
}else{
// PCF8563 RTC in tbeam-s3 uses Wire1 to share I2C bus
Wire1.beginTransmission(PCF8563_RTC);
if (Wire1.endTransmission() == 0){
rtc_found = PCF8563_RTC;
DEBUG_MSG("PCF8563 RTC found\n");
}
}
#ifdef RAK4630