Use common power amp definition for Heltec v4 and Heltec Tracker v2

This commit is contained in:
Tom Fifield
2025-09-30 08:30:18 +10:00
parent 8d323a1cf1
commit 0f6131d2c8
5 changed files with 10 additions and 9 deletions

View File

@@ -52,7 +52,7 @@ template <typename T> bool SX126xInterface<T>::init()
pinMode(SX126X_POWER_EN, OUTPUT);
#endif
#if defined(HELTEC_V4)||defined(HELTEC_WIRELESS_TRACKER_V2)
#if defined(USE_GC1109_PA)
pinMode(LORA_PA_POWER, OUTPUT);
digitalWrite(LORA_PA_POWER, HIGH);
@@ -352,7 +352,7 @@ template <typename T> bool SX126xInterface<T>::sleep()
digitalWrite(SX126X_POWER_EN, LOW);
#endif
#if defined(HELTEC_V4)||defined(HELTEC_WIRELESS_TRACKER_V2)
#if defined(USE_GC1109_PA)
/*
* Do not switch the power on and off frequently.
* After turning off LORA_PA_EN, the power consumption has dropped to the uA level.
@@ -367,7 +367,7 @@ template <typename T> bool SX126xInterface<T>::sleep()
/** Some boards require GPIO control of tx vs rx paths */
template <typename T> void SX126xInterface<T>::setTransmitEnable(bool txon)
{
#if defined(HELTEC_V4)||defined(HELTEC_WIRELESS_TRACKER_V2)
#if defined(USE_GC1109_PA)
digitalWrite(LORA_PA_POWER, HIGH);
digitalWrite(LORA_PA_EN, HIGH);
digitalWrite(LORA_PA_TX_EN, txon ? 1 : 0);