diff --git a/src/mesh/SX1262Interface.cpp b/src/mesh/SX1262Interface.cpp index 8edb72944..6350741e4 100644 --- a/src/mesh/SX1262Interface.cpp +++ b/src/mesh/SX1262Interface.cpp @@ -12,6 +12,11 @@ SX1262Interface::SX1262Interface(RADIOLIB_PIN_TYPE cs, RADIOLIB_PIN_TYPE irq, RA /// \return true if initialisation succeeded. bool SX1262Interface::init() { +#ifdef SX1262_POWER_EN + digitalWrite(SX1262_POWER_EN, HIGH); + pinMode(SX1262_POWER_EN, OUTPUT); +#endif + RadioLibInterface::init(); #ifdef SX1262_RXEN // set not rx or tx mode diff --git a/variants/lora_relay_v1/variant.cpp b/variants/lora_relay_v1/variant.cpp index 250101b77..58652a5c7 100644 --- a/variants/lora_relay_v1/variant.cpp +++ b/variants/lora_relay_v1/variant.cpp @@ -40,7 +40,7 @@ const uint32_t g_ADigitalPinMap[] = { 8, // D12 is P0.08 D_CS (IPS display chip select) 41, // D13 is P1.09 BLT (IPS display backlight) 4, // D14 is P0.04 SX1262 RXEN - 5, // D15 is P0.05 PHOLD + 5, // D15 is P0.05 BOOST_EN (5V buck converter enable for the the radio power) // D14 .. D21 (aka A0 .. A7) 30, // D16 is P0.30 (A0) diff --git a/variants/lora_relay_v1/variant.h b/variants/lora_relay_v1/variant.h index 7d2dcaf14..44e14eb4e 100644 --- a/variants/lora_relay_v1/variant.h +++ b/variants/lora_relay_v1/variant.h @@ -84,8 +84,6 @@ static const uint8_t A5 = PIN_A5; #define PIN_NFC2 (2) #define PIN_DISPLAY_RESET (11) // Output #define PIN_PIEZO (37) -#define PIN_POWER_HOLD \ - (15) // FIXME, see warning hre https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay/blob/master/LORA_RELAY_NRF52840.ino static const uint8_t AREF = PIN_AREF; /* @@ -128,6 +126,8 @@ static const uint8_t SCK = PIN_SPI_SCK; // #define SX1262_ANT_SW (32 + 10) #define SX1262_RXEN (14) #define SX1262_TXEN (31) +#define SX1262_POWER_EN \ + (15) // FIXME, see warning hre https://github.com/BigCorvus/SX1262-LoRa-BLE-Relay/blob/master/LORA_RELAY_NRF52840.ino #define SX1262_E22 // Indicates this SX1262 is inside of an ebyte E22 module and special config should be done for that #ifdef __cplusplus