Skip to content

Commit c4a2b13

Browse files
committed
moved HeltecV3Board.h to variant folder
1 parent da52d08 commit c4a2b13

File tree

3 files changed

+11
-16
lines changed

3 files changed

+11
-16
lines changed
Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,7 @@
22

33
#include <Arduino.h>
44
#include <helpers/RefCountedDigitalPin.h>
5-
6-
// LoRa radio module pins for Heltec V3
7-
// Also for Heltec Wireless Tracker/Paper
8-
#define P_LORA_DIO_1 14
9-
#define P_LORA_NSS 8
10-
#define P_LORA_RESET RADIOLIB_NC
11-
#define P_LORA_BUSY 13
12-
#define P_LORA_SCLK 9
13-
#define P_LORA_MISO 11
14-
#define P_LORA_MOSI 10
5+
#include <helpers/ESP32Board.h>
156

167
// built-ins
178
#ifndef PIN_VBAT_READ // set in platformio.ini for boards like Heltec Wireless Paper (20)
@@ -22,9 +13,6 @@
2213
#endif
2314
#define PIN_ADC_CTRL_ACTIVE LOW
2415
#define PIN_ADC_CTRL_INACTIVE HIGH
25-
//#define PIN_LED_BUILTIN 35
26-
27-
#include "ESP32Board.h"
2816

2917
#include <driver/rtc_io.h>
3018

@@ -43,7 +31,7 @@ class HeltecV3Board : public ESP32Board {
4331
// Auto-detect correct ADC_CTRL pin polarity (different for boards >3.2)
4432
pinMode(PIN_ADC_CTRL, INPUT);
4533
adc_active_state = !digitalRead(PIN_ADC_CTRL);
46-
34+
4735
pinMode(PIN_ADC_CTRL, OUTPUT);
4836
digitalWrite(PIN_ADC_CTRL, !adc_active_state); // Initially inactive
4937

@@ -64,7 +52,7 @@ class HeltecV3Board : public ESP32Board {
6452
void enterDeepSleep(uint32_t secs, int pin_wake_btn = -1) {
6553
esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON);
6654

67-
// Make sure the DIO1 and NSS GPIOs are hold on required levels during deep sleep
55+
// Make sure the DIO1 and NSS GPIOs are hold on required levels during deep sleep
6856
rtc_gpio_set_direction((gpio_num_t)P_LORA_DIO_1, RTC_GPIO_MODE_INPUT_ONLY);
6957
rtc_gpio_pulldown_en((gpio_num_t)P_LORA_DIO_1);
7058

variants/heltec_v3/platformio.ini

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ build_flags =
77
-I variants/heltec_v3
88
-D HELTEC_LORA_V3
99
-D ESP32_CPU_FREQ=80
10+
-D P_LORA_DIO_1=14
11+
-D P_LORA_NSS=8
12+
-D P_LORA_RESET=RADIOLIB_NC
13+
-D P_LORA_BUSY=13
14+
-D P_LORA_SCLK=9
15+
-D P_LORA_MISO=11
16+
-D P_LORA_MOSI=10
1017
-D RADIO_CLASS=CustomSX1262
1118
-D WRAPPER_CLASS=CustomSX1262Wrapper
1219
-D LORA_TX_POWER=22

variants/heltec_v3/target.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
#define RADIOLIB_STATIC_ONLY 1
44
#include <RadioLib.h>
55
#include <helpers/radiolib/RadioLibWrappers.h>
6-
#include <helpers/HeltecV3Board.h>
6+
#include <HeltecV3Board.h>
77
#include <helpers/radiolib/CustomSX1262Wrapper.h>
88
#include <helpers/AutoDiscoverRTCClock.h>
99
#include <helpers/SensorManager.h>

0 commit comments

Comments
 (0)