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

@@ -64,16 +64,23 @@ bool GPS::setupGPS()
if (_serial_gps && !didSerialInit) {
didSerialInit = true;
#if CONFIG_IDF_TARGET_ESP32S3
// In esp32s3 framework, setRxBufferSize needs to be initialized before Serial
_serial_gps->setRxBufferSize(2048); // the default is 256
#endif
// ESP32 has a special set of parameters vs other arduino ports
#if defined(GPS_RX_PIN) && defined(ARCH_ESP32)
_serial_gps->begin(GPS_BAUDRATE, SERIAL_8N1, GPS_RX_PIN, GPS_TX_PIN);
#else
_serial_gps->begin(GPS_BAUDRATE);
#endif
#ifdef ARCH_ESP32
#if CONFIG_IDF_TARGET_ESP32
_serial_gps->setRxBufferSize(2048); // the default is 256
#endif
#ifdef TTGO_T_ECHO
#if defined(TTGO_T_ECHO) || defined(LILYGO_TBEAM_S3_CORE)
// Switch to 9600 baud, then close and reopen port
_serial_gps->end();
delay(250);