add heltec tracker v2 board.

This commit is contained in:
Quency-D
2025-09-29 17:49:31 +08:00
committed by Tom Fifield
parent a3e6f16378
commit 8d323a1cf1
8 changed files with 208 additions and 5 deletions

View File

@@ -52,7 +52,7 @@ template <typename T> bool SX126xInterface<T>::init()
pinMode(SX126X_POWER_EN, OUTPUT);
#endif
#ifdef HELTEC_V4
#if defined(HELTEC_V4)||defined(HELTEC_WIRELESS_TRACKER_V2)
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
#ifdef HELTEC_V4
#if defined(HELTEC_V4)||defined(HELTEC_WIRELESS_TRACKER_V2)
/*
* 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)
{
#ifdef HELTEC_V4
#if defined(HELTEC_V4)||defined(HELTEC_WIRELESS_TRACKER_V2)
digitalWrite(LORA_PA_POWER, HIGH);
digitalWrite(LORA_PA_EN, HIGH);
digitalWrite(LORA_PA_TX_EN, txon ? 1 : 0);