Merge pull request #522 from recrof/patch-11
Heltec Wireless Paper fix: radio init failed: -2
This commit is contained in:
@@ -1,11 +1,14 @@
|
|||||||
#include "target.h"
|
#include "target.h"
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
|
|
||||||
HeltecV3Board board;
|
HeltecV3Board board;
|
||||||
|
|
||||||
static SPIClass spi;
|
#if defined(P_LORA_SCLK)
|
||||||
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
|
static SPIClass spi;
|
||||||
|
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, spi);
|
||||||
|
#else
|
||||||
|
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY);
|
||||||
|
#endif
|
||||||
|
|
||||||
WRAPPER_CLASS radio_driver(radio, board);
|
WRAPPER_CLASS radio_driver(radio, board);
|
||||||
|
|
||||||
@@ -21,7 +24,11 @@ DISPLAY_CLASS display;
|
|||||||
bool radio_init() {
|
bool radio_init() {
|
||||||
fallback_clock.begin();
|
fallback_clock.begin();
|
||||||
rtc_clock.begin(Wire);
|
rtc_clock.begin(Wire);
|
||||||
|
#if defined(P_LORA_SCLK)
|
||||||
return radio.std_init(&spi);
|
return radio.std_init(&spi);
|
||||||
|
#else
|
||||||
|
return radio.std_init();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t radio_get_rng_seed() {
|
uint32_t radio_get_rng_seed() {
|
||||||
|
|||||||
Reference in New Issue
Block a user