#ifndef LORAHANDLER_H
#define LORAHANDLER_H

#include "config.hpp"
#include <SPI.h>
#include <LoRa.h>

#define LORA_SCK            5
#define LORA_MISO           19
#define LORA_MOSI           27
#define LORA_CS             18  // CS  --> NSS
#define LORA_RST            14
#define LORA_IRQ            26  // IRQ --> DIO0

struct ReceivedLoRaPacket {
    String  text;
    int     rssi;
    float   snr;
    int     freqError;
};

class LoraHandler {
    public:
        void setup();
        ReceivedLoRaPacket receivePacket();
    private:
};

#endif /* LORAHANDLER_H */