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)
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
0 commit comments