Add t-beam-s3-core onboard device support. (#1764)

* Change t-beam-s3-core pins definitions

* Add t-beam-s3-core power initialization to properly initialize the I2C device

* Add 6-axis and 3-axis sensor detection
This commit is contained in:
lewis he
2022-10-07 19:57:55 +08:00
committed by GitHub
parent cefd4cd647
commit 004f6fa4d6
7 changed files with 83 additions and 8 deletions

View File

@@ -214,6 +214,10 @@ void setup()
// router = new DSRRouter();
router = new ReliableRouter();
#ifdef I2C_SDA1
Wire1.begin(I2C_SDA1, I2C_SCL1);
#endif
#ifdef I2C_SDA
Wire.begin(I2C_SDA, I2C_SCL);
#elif HAS_WIRE
@@ -229,7 +233,6 @@ void setup()
delay(1);
#endif
scanI2Cdevice();
#ifdef RAK4630
// scanEInkDevice();
#endif
@@ -269,6 +272,12 @@ void setup()
powerStatus->observe(&power->newStatus);
power->setup(); // Must be after status handler is installed, so that handler gets notified of the initial configuration
/*
* Move the scanning I2C device to the back of power initialization.
* Some boards need to be powered on to correctly scan to the device address, such as t-beam-s3-core
*/
scanI2Cdevice();
// Init our SPI controller (must be before screen and lora)
initSPI();
#ifndef ARCH_ESP32