From cce8b0c18ad4ded35fec34ac4ad453864539e667 Mon Sep 17 00:00:00 2001 From: "jacob.eva" Date: Sun, 21 Jan 2024 14:23:28 +0000 Subject: [PATCH] Fix nRF52 compilation error --- Config.h | 1 + RNode_Firmware.ino | 6 ++++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/Config.h b/Config.h index 86a6482..43cb29b 100644 --- a/Config.h +++ b/Config.h @@ -330,6 +330,7 @@ const int pin_dio = 47; const int pin_led_rx = LED_BLUE; const int pin_led_tx = LED_GREEN; + const int pin_tcxo_enable = -1; #endif #else #error An unsupported board was selected. Cannot compile RNode firmware. diff --git a/RNode_Firmware.ino b/RNode_Firmware.ino index 197aff3..05acd1a 100644 --- a/RNode_Firmware.ino +++ b/RNode_Firmware.ino @@ -73,8 +73,10 @@ void setup() { #endif #if HAS_TCXO == true - pinMode(pin_tcxo_enable, OUTPUT); - digitalWrite(pin_tcxo_enable, HIGH); + if (pin_tcxo_enable != -1) { + pinMode(pin_tcxo_enable, OUTPUT); + digitalWrite(pin_tcxo_enable, HIGH); + } #endif // Initialise buffers