mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
* Heltec tracker: new 'periph_power' shared pin (between Display & GPS)
This commit is contained in:
parent
997261a68e
commit
810fc8b8f0
8 changed files with 86 additions and 27 deletions
|
|
@ -1,6 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <helpers/RefCountedDigitalPin.h>
|
||||
|
||||
// LoRa radio module pins for Heltec V3
|
||||
// Also for Heltec Wireless Tracker
|
||||
|
|
@ -20,7 +21,6 @@
|
|||
#define PIN_ADC_CTRL_ACTIVE LOW
|
||||
#define PIN_ADC_CTRL_INACTIVE HIGH
|
||||
//#define PIN_LED_BUILTIN 35
|
||||
#define PIN_VEXT_EN 36
|
||||
|
||||
#include "ESP32Board.h"
|
||||
|
||||
|
|
@ -31,6 +31,10 @@ private:
|
|||
bool adc_active_state;
|
||||
|
||||
public:
|
||||
RefCountedDigitalPin periph_power;
|
||||
|
||||
HeltecV3Board() : periph_power(PIN_VEXT_EN) { }
|
||||
|
||||
void begin() {
|
||||
ESP32Board::begin();
|
||||
|
||||
|
|
@ -41,8 +45,7 @@ public:
|
|||
pinMode(PIN_ADC_CTRL, OUTPUT);
|
||||
digitalWrite(PIN_ADC_CTRL, !adc_active_state); // Initially inactive
|
||||
|
||||
pinMode(PIN_VEXT_EN, OUTPUT);
|
||||
digitalWrite(PIN_VEXT_EN, LOW); // for V3.2 boards
|
||||
periph_power.begin();
|
||||
|
||||
esp_reset_reason_t reason = esp_reset_reason();
|
||||
if (reason == ESP_RST_DEEPSLEEP) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue