sforkowany z mirror/meshtastic-firmware
auto probe for pinelora devices
rodzic
5a3ff137f9
commit
68cb62ab23
|
@ -1,5 +1,6 @@
|
|||
#include "CryptoEngine.h"
|
||||
#include "PortduinoGPIO.h"
|
||||
#include "SPIChip.h"
|
||||
#include "mesh/RF95Interface.h"
|
||||
#include "sleep.h"
|
||||
#include "target_specific.h"
|
||||
|
@ -50,8 +51,6 @@ class PolledIrqPin : public GPIOPin
|
|||
|
||||
static GPIOPin *loraIrq;
|
||||
|
||||
static bool usePineLora;
|
||||
|
||||
/** apps run under portduino can optionally define a portduinoSetup() to
|
||||
* use portduino specific init code (such as gpioBind) to setup portduino on their host machine,
|
||||
* before running 'arduino' code.
|
||||
|
@ -60,6 +59,9 @@ void portduinoSetup()
|
|||
{
|
||||
printf("Setting up Meshtastic on Porduino...\n");
|
||||
|
||||
SPI.begin(); // We need to create SPI
|
||||
bool usePineLora = !spiChip->isSimulated();
|
||||
|
||||
if(usePineLora) {
|
||||
printf("Connecting to PineLora board...\n");
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue