]> git.tnoah.ca Git - lora-radio.git/commitdiff
Fix nRF52 compilation error
authorjacob.eva <x00010@disroot.org>
Sun, 21 Jan 2024 14:23:28 +0000 (14:23 +0000)
committerjacob.eva <x00010@disroot.org>
Sun, 21 Jan 2024 14:23:28 +0000 (14:23 +0000)
Config.h
RNode_Firmware.ino

index 86a6482c6952782050692ed2a0d615b8a7d7371e..43cb29b004061fd36eb5ffacd2a3f930dc2c613a 100644 (file)
--- a/Config.h
+++ b/Config.h
             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.
index 197aff3e7479aebdbfaea6a7dcf41cce07655a82..05acd1ac7ffb4a3f37edf947ec21e567bc69c5f6 100644 (file)
@@ -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