mirror of
https://github.com/meshtastic/firmware.git
synced 2025-04-25 17:42:48 +00:00
auto probe for pinelora devices
This commit is contained in:
parent
5a3ff137f9
commit
68cb62ab23
@ -1,5 +1,6 @@
|
|||||||
#include "CryptoEngine.h"
|
#include "CryptoEngine.h"
|
||||||
#include "PortduinoGPIO.h"
|
#include "PortduinoGPIO.h"
|
||||||
|
#include "SPIChip.h"
|
||||||
#include "mesh/RF95Interface.h"
|
#include "mesh/RF95Interface.h"
|
||||||
#include "sleep.h"
|
#include "sleep.h"
|
||||||
#include "target_specific.h"
|
#include "target_specific.h"
|
||||||
@ -50,8 +51,6 @@ class PolledIrqPin : public GPIOPin
|
|||||||
|
|
||||||
static GPIOPin *loraIrq;
|
static GPIOPin *loraIrq;
|
||||||
|
|
||||||
static bool usePineLora;
|
|
||||||
|
|
||||||
/** apps run under portduino can optionally define a portduinoSetup() to
|
/** 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,
|
* use portduino specific init code (such as gpioBind) to setup portduino on their host machine,
|
||||||
* before running 'arduino' code.
|
* before running 'arduino' code.
|
||||||
@ -60,6 +59,9 @@ void portduinoSetup()
|
|||||||
{
|
{
|
||||||
printf("Setting up Meshtastic on Porduino...\n");
|
printf("Setting up Meshtastic on Porduino...\n");
|
||||||
|
|
||||||
|
SPI.begin(); // We need to create SPI
|
||||||
|
bool usePineLora = !spiChip->isSimulated();
|
||||||
|
|
||||||
if(usePineLora) {
|
if(usePineLora) {
|
||||||
printf("Connecting to PineLora board...\n");
|
printf("Connecting to PineLora board...\n");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user