mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-31 15:10:40 +00:00
add heltec tracker v2 board.
This commit is contained in:
@@ -453,7 +453,7 @@ void Screen::handleSetOn(bool on, FrameCallback einkScreensaver)
|
||||
#endif
|
||||
|
||||
dispdev->displayOn();
|
||||
#ifdef HELTEC_TRACKER_V1_X
|
||||
#if defined(HELTEC_TRACKER_V1_X) || defined(HELTEC_WIRELESS_TRACKER_V2)
|
||||
ui->init();
|
||||
#endif
|
||||
#ifdef USE_ST7789
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -201,6 +201,8 @@
|
||||
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_V4
|
||||
#elif defined(M5STACK_UNITC6L)
|
||||
#define HW_VENDOR meshtastic_HardwareModel_M5STACK_C6L
|
||||
#elif defined(HELTEC_WIRELESS_TRACKER_V2)
|
||||
#define HW_VENDOR meshtastic_HardwareModel_HELTEC_WIRELESS_TRACKER_V2
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
@@ -554,7 +554,7 @@ void enableLoraInterrupt()
|
||||
gpio_pullup_en((gpio_num_t)LORA_CS);
|
||||
#endif
|
||||
|
||||
#ifdef HELTEC_V4
|
||||
#if defined(HELTEC_V4)||defined(HELTEC_WIRELESS_TRACKER_V2)
|
||||
gpio_pullup_en((gpio_num_t)LORA_PA_POWER);
|
||||
gpio_pullup_en((gpio_num_t)LORA_PA_EN);
|
||||
gpio_pulldown_en((gpio_num_t)LORA_PA_TX_EN);
|
||||
|
||||
Reference in New Issue
Block a user