Restructured Repo before adding Hardware-Files
This commit is contained in:
20
Software/src/lora_net.cpp
Normal file
20
Software/src/lora_net.cpp
Normal file
@@ -0,0 +1,20 @@
|
||||
#include "lora_net.h"
|
||||
|
||||
uint8_t LoRa_Init()
|
||||
{
|
||||
uint8_t success = false;
|
||||
// SPI LoRa pins
|
||||
SPI.begin(LORA_SCK, LORA_MISO, LORA_MOSI, LORA_SS);
|
||||
// setup LoRa transceiver module
|
||||
LoRa.setPins(LORA_SS, LORA_RST, LORA_DIO0);
|
||||
|
||||
if (!LoRa.begin(LORA_BAND))
|
||||
{
|
||||
Serial.println("Starting LoRa failed!");
|
||||
success = false;
|
||||
}
|
||||
Serial.println("LoRa Initializing OK!");
|
||||
success = true;
|
||||
|
||||
return success;
|
||||
}
|
Reference in New Issue
Block a user