Skip to content

Commit 8c104b8

Browse files
author
Scott Powell
committed
Merge commit '9117798a41ce1538dae824e18a54a1fa3a735126' into dev
2 parents 4a29787 + 9117798 commit 8c104b8

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

variants/heltec_wireless_paper/target.cpp

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
#include "target.h"
2-
32
#include <Arduino.h>
43

54
HeltecV3Board board;
65

7-
static SPIClass spi;
8-
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
6+
#if defined(P_LORA_SCLK)
7+
static SPIClass spi;
8+
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
9+
#else
10+
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
11+
#endif
912

1013
WRAPPER_CLASS radio_driver(radio, board);
1114

@@ -21,7 +24,11 @@ DISPLAY_CLASS display;
2124
bool radio_init() {
2225
fallback_clock.begin();
2326
rtc_clock.begin(Wire);
27+
#if defined(P_LORA_SCLK)
2428
return radio.std_init(&spi);
29+
#else
30+
return radio.std_init();
31+
#endif
2532
}
2633

2734
uint32_t radio_get_rng_seed() {
@@ -42,4 +49,4 @@ void radio_set_tx_power(uint8_t dbm) {
4249
mesh::LocalIdentity radio_new_identity() {
4350
RadioNoiseListener rng(radio);
4451
return mesh::LocalIdentity(&rng); // create new random identity
45-
}
52+
}

0 commit comments

Comments
 (0)