Skip to content

Commit def1902

Browse files
committed
Fixed T-Beam board to work with sleep
1 parent 0d11a02 commit def1902

1 file changed

Lines changed: 8 additions & 10 deletions

File tree

src/helpers/esp32/TBeamBoard.h

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@
22

33
#if defined(TBEAM_SUPREME_SX1262) || defined(TBEAM_SX1262) || defined(TBEAM_SX1276)
44

5-
#include <Wire.h>
6-
#include <Arduino.h>
7-
#include "XPowersLib.h"
8-
#include "helpers/ESP32Board.h"
9-
#include <driver/rtc_io.h>
10-
//#include <RadioLib.h>
11-
//#include <helpers/RadioLibWrappers.h>
12-
//#include <helpers/CustomSX1262Wrapper.h>
13-
//#include <helpers/CustomSX1276Wrapper.h>
14-
5+
// Define pin mappings BEFORE including ESP32Board.h so sleep() can use P_LORA_DIO_1
156
#ifdef TBEAM_SUPREME_SX1262
167
// LoRa radio module pins for TBeam S3 Supreme SX1262
178
#define P_LORA_DIO_0 -1 //NC
@@ -90,6 +81,13 @@
9081
// SX1276
9182
// };
9283

84+
// Include headers AFTER pin definitions so ESP32Board::sleep() can use P_LORA_DIO_1
85+
#include <Wire.h>
86+
#include <Arduino.h>
87+
#include "XPowersLib.h"
88+
#include "helpers/ESP32Board.h"
89+
#include <driver/rtc_io.h>
90+
9391
class TBeamBoard : public ESP32Board {
9492
XPowersLibInterface *PMU = NULL;
9593
//PhysicalLayer * pl;

0 commit comments

Comments
 (0)