From db6292ce594aacd7c034c28ebe6eaa57676c46d9 Mon Sep 17 00:00:00 2001 From: richonguzman Date: Mon, 28 Oct 2024 09:33:27 -0300 Subject: [PATCH] added but reboots --- platformio.ini | 13 +++++++++++++ src/boards_pinout.h | 18 ++++++++++++++++++ src/power_utils.cpp | 2 +- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 5b5c3cf..b3bddbf 100644 --- a/platformio.ini +++ b/platformio.ini @@ -466,6 +466,19 @@ build_flags = -DHAS_SX1268 -DARDUINO_USB_MODE=1 -DARDUINO_USB_CDC_ON_BOOT=1 +lib_deps = + ${common.lib_deps} + ${common.display_libs} + +[env:ttgo_lora32_t3s3_v1_2_915] +board = esp32-s3-devkitc-1 +board_build.mcu = esp32s3 +build_flags = + ${common.build_flags} + -DTTGO_T_LORA32_T3S3_V1_2_915 + -DHAS_SX1262 + -DARDUINO_USB_MODE=1 + -DARDUINO_USB_CDC_ON_BOOT=1 lib_deps = ${common.lib_deps} ${common.display_libs} \ No newline at end of file diff --git a/src/boards_pinout.h b/src/boards_pinout.h index 6da9664..63fab93 100644 --- a/src/boards_pinout.h +++ b/src/boards_pinout.h @@ -310,4 +310,22 @@ DIO0 26 REST 14 GND - */ + +#ifdef TTGO_T_LORA32_T3S3_V1_2_915 + #define RADIO_SCLK_PIN 5 // SX1262 SCK + #define RADIO_MISO_PIN 3 // SX1262 MISO + #define RADIO_MOSI_PIN 6 // SX1262 MOSI + #define RADIO_CS_PIN 7 // SX1262 NSS + #define RADIO_RST_PIN 8 // SX1262 RST + #define RADIO_DIO1_PIN 33 // SX1262 DIO1 + #define RADIO_BUSY_PIN 34 // SX1262 BUSY + + #define OLED_SDA 18 //17? + #define OLED_SCL 17 //18? + #define OLED_RST -1 + + #define INTERNAL_LED_PIN 37 // Green Led + #define BATTERY_PIN 1 +#endif + #endif \ No newline at end of file diff --git a/src/power_utils.cpp b/src/power_utils.cpp index e58ae0a..7cfac92 100644 --- a/src/power_utils.cpp +++ b/src/power_utils.cpp @@ -205,7 +205,7 @@ namespace POWER_Utils { Wire1.begin(BOARD_I2C_SDA, BOARD_I2C_SCL); #endif - #if defined(HELTEC_V3) || defined(HELTEC_WS) || defined(LIGHTGATEWAY_1_0) + #if defined(HELTEC_V3) || defined(HELTEC_WS) || defined(LIGHTGATEWAY_1_0) || defined(TTGO_T_LORA32_T3S3_V1_2_915) Wire.begin(OLED_SDA, OLED_SCL); #endif